title: Scrypt algorithm output doesen't match up as expected
body: <p>I am trying to get my head around the scrypt algorithm output.</p>
  
  <p>On <a href="https://litecoin.info/Block_hashing_algorithm" rel="nofollow">https://litecoin.info/Block_hashing_algorithm</a> the author gets the scrypt encryption result for the <code>headerString</code>:</p>
  
  <p><code>01000000ae178934851bfa0e83ccb6a3fc4bfddff3641e104b6c4680c31509074e699be2bd672d8 d2199ef37a59678f92443083e3b85edef8b45c71759371f823bab59a97126614f44d5001d45920180</code> [little endian]</p>
  
  <p>to </p>
  
  <p><code>000000003b4ba52ab765631e20a04b88cd27f0b66d3509fb2da7781fae6d7901</code>. [big endian]</p>
  
  <p>I'm trying to replicate this but im not able to reproduce that result. I'm using an implementation that gives the correct output for the test vectors in the end of this paper: <a href="http://www.tarsnap.com/scrypt/scrypt.pdf" rel="nofollow">http://www.tarsnap.com/scrypt/scrypt.pdf</a> but when running the <code>headerString</code> through it with the correct settings for N,r,p(1024,1,1) i get the result </p>
  
  <p><code>c17fcd0c6d698828112ade740d4e8ad76705764da3abfc49ff3bb1863cd16472</code>. [big endian]</p>
  
  <p>I have tried it with the same result those implementations with the same result from both:</p>
  
  <pre><code>data = "01000000ae178934851bfa0e83ccb6a3fc4bfddff3641e104b6c4680c31509074e699be2bd672d8 d2199ef37a59678f92443083e3b85edef8b45c71759371f823bab59a97126614f44d5001d45920180";
  
      https://github.com/cheongwy/node-scrypt-js
  var result = scrypt(data,data, 1024,1,1,32);
  
      https://github.com/tonyg/js-scrypt
  var result = scrypt.crypto_scrypt(scrypt.encode_utf8(data), scrypt.encode_utf8(data), 1024, 1, 1, 32);
  </code></pre>
  
  <p>Im after the scrypt call im just parsing the byte array to a hex string if needed</p>
  
  <p>Am I missing something here? I just can't understand why I am not getting the same result when I have validated my scrypt implementation against the paper about it.</p>
  
  <p>I really need help solving this! If i haven't provided enought information please ask and ill try my best to clear things out.</p>