Tôi đã sau mã trong C#C# PasswordDeriveBytes Lẫn lộn
PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations);
byte[] KeyBytes = DerivedPassword.GetBytes(32);
Tôi đang sử dụng "SHA1" băm thuật toán.
Theo định nghĩa SHA1, nó tạo khóa 160 bit (20 byte). Câu hỏi của tôi là cách GetBytes nhận được 32 byte từ DerivedPassword, thuật toán nào được sử dụng sau phương thức GetBytes?
Phương thức này bắt nguồn 32 byte từ 20 byte (thuật toán băm 'SHA1' được tạo). – Siddiqui
@Siddiqui @ 'HenrickHellstrom giải thích nó độc đáo. – vcsjones