-
da1l6 authored
The buffer that was used to calculate it did not contain the current salt. Instead of creating a new buffer, we now use the sha1 block functions directly and hash key and salt in two calls. Additionally a ctx2hashhead function is added to convert only the first 4 bytes of the hash instead of converting all 20 bytes and throwing 16 bytes away afterwards.
da1l6 authoredThe buffer that was used to calculate it did not contain the current salt. Instead of creating a new buffer, we now use the sha1 block functions directly and hash key and salt in two calls. Additionally a ctx2hashhead function is added to convert only the first 4 bytes of the hash instead of converting all 20 bytes and throwing 16 bytes away afterwards.