I need to hash a password with salt in C#. Salt is obtained from one source and is of type byte[], password is obtained from another source and is of type String.
Computing a hash of one block is quite easy - just call HashAlgorithm.ComputeHash() and it's done, but how do I compute a hash of two blocks without first building their concatenation?
You'll want to look into the TransformBlock and TransformFinalBlock methods.
The latter MSDN link exemplifies use of both with a code sample that is potentially to much to post here.
Use TransformBlock and TransformFinalBlock and then use the Hash property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With