title: Coldfusion Hash with SHA-1 vs Php sha1
body: <p>I have tried to encrypt the some string using sha-1 in coldfusion 10 and php.</p>
  
  <p>coldfusion code:</p>
  
  <pre><code>&lt;cfsavecontent variable="Mydata"&gt;
  abcdefghijklmn
  &lt;/cfsavecontent&gt;
  &lt;cfset data = Hash(Mydata,"sha-1") &gt;
  &lt;cfdump var="#data#" abort="true"/&gt;
  </code></pre>
  
  <p>Coldfusion OutPut:
   113D1951E36C83FE1F60BF3BC520CEF65E0373BE</p>
  
  <p>PHP code:</p>
  
  <pre><code>$content_digest = sha1('abcdefghijklmn');
  var_dump($content_digest);
  exit();
  </code></pre>
  
  <p>PHP OutPut:
   85d7c5ff403abe72df5b8a2708821ee33cd0bcce</p>
  
  <p>Both code didn't produce the same output.</p>
  
  <p>And I have tried online tool for SHA-1 <a href="http://www.freeformatter.com/sha1-generator.html#ad-output" rel="nofollow">http://www.freeformatter.com/sha1-generator.html#ad-output</a></p>
  
  <p>Site OutPut: 85d7c5ff403abe72df5b8a2708821ee33cd0bcce</p>
  
  <p>That site and php code are produce the same output.</p>
  
  <p>Anyone explain please what is going wrong in my cf code? Thank you.</p>