Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ComVisible(true)]
- public string HashPassword(string password)
- {
- byte[] salt;
- byte[] subkey;
- using (var deriveBytes = new Rfc2898DeriveBytes(password, SaltSize, PBKDF2IterCount))
- {
- salt = deriveBytes.Salt;
- subkey = deriveBytes.GetBytes(PBKDF2SubkeyLength);
- }
- var outputBytes = new byte[1 + SaltSize + PBKDF2SubkeyLength];
- //some more code goes here
- return Convert.ToBase64String(outputBytes);
- }
Add Comment
Please, Sign In to add comment