【发布时间】:2012-03-03 03:45:53
【问题描述】:
我在 C# 中有以下代码
PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations);
byte[] KeyBytes = DerivedPassword.GetBytes(32);
我正在使用“SHA1”哈希算法。
根据 SHA1 定义,它生成 160 位(20 字节)的密钥。我的问题是 GetBytes 方法如何从 DerivedPassword 中获取 32 个字节,GetBytes 方法背后使用了什么算法?
【问题讨论】:
标签: c# cryptography pbkdf2