title: ColdFusion Hash
body: <p>I'm trying to create a password digest with this formula to get the following variables and my code is just not matching.  Not sure what I'm doing wrong, but I'll admit when I need help.  Hopefully someone is out there who can help.</p>
  
  <ul>
  <li><p>Formula from documentation: <code>Base64(SHA1(NONCE + TIMESTAMP + SHA1(PASSWORD)))</code></p></li>
  <li><p>Correct Password Digest Answer: <code>+LzcaRc+ndGAcZIXmq/N7xGes+k=</code></p></li>
  </ul>
  
  <p>ColdFusion Code:</p>
  
  <pre><code>&lt;cfSet PW = "AMADEUS"&gt;
  &lt;cfSet TS = "2015-09-30T14:12:15Z"&gt;
  &lt;cfSet NONCE = "secretnonce10111"&gt; 
  &lt;cfDump var="#ToBase64(Hash(NONCE &amp; TS &amp; Hash(PW,'SHA-1'),'SHA-1'))#"&gt;
  </code></pre>
  
  <p>My code outputs:</p>
  
  <pre><code>Njk0MEY3MDc0NUYyOEE1MDMwRURGRkNGNTVGOTcyMUI4OUMxM0U0Qg==
  </code></pre>
  
  <p>I'm clearly doing something wrong, but for the life of me cannot figure out what.  Anyone?  Bueller?</p>