我在 C# 中有以下代码
PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations);
byte[] KeyBytes = DerivedPassword.GetBytes(32);
我正在使用“SHA1”散列算法。
根据 SHA1 定义,它生成 160 位(20 字节)的密钥。我的问题是 GetBytes 方法如何从 DerivedPassword 获取 32 个字节,GetBytes 方法背后使用什么算法?