Notifications
Announcements
No record found.
https://community.dynamics.com/crm/b/raorapolumsdynamicscrmblog/archive/2017/04/21/password-salt-hash-algorithms
*This post is locked for comments
We use this exact method. We had a portal which previously worked off of clear text so we created two new fields, Salt and Hash, when the user logged in for the first time, we salted and hashed the password and saved to the customer entity. In our case I implemented the salt and hash function inside a workflow object so our customer support people would be able to reset passwords.
I would suggest not using sha1 though as it has been cracked now so use sha256 or something else.
public static string ComputeHash(string input, HashAlgorithm algorithm, Byte[] salt) { Byte[] inputBytes = Encoding.UTF8.GetBytes(input); // Combine salt and input bytes Byte[] saltedInput = new Byte[salt.Length + inputBytes.Length]; salt.CopyTo(saltedInput, 0); inputBytes.CopyTo(saltedInput, salt.Length); Byte[] hashedBytes = algorithm.ComputeHash(saltedInput); return BitConverter.ToString(hashedBytes); }
Thanks Stephen for heads up.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2