App.Security.PasswordHash.PBKDF2 C# (CSharp) Method

PBKDF2() private static method

Computes the PBKDF2-SHA1 hash of a password.
private static PBKDF2 ( string password, byte salt, int iterations, int outputBytes ) : byte[]
password string The password to hash.
salt byte The salt.
iterations int The PBKDF2 iteration count.
outputBytes int The length of the hash to generate, in bytes.
return byte[]
        private static byte[] PBKDF2(string password, byte[] salt, int iterations, int outputBytes)
        {
            var pbkdf2 = new Rfc2898DeriveBytes(password, salt);
            pbkdf2.IterationCount = iterations;
            return pbkdf2.GetBytes(outputBytes);
        }