Share via


KeyDerivation.Pbkdf2(String, Byte[], KeyDerivationPrf, Int32, Int32) 方法

定義

使用 PBKDF2 演算法執行金鑰衍生。

public:
 static cli::array <System::Byte> ^ Pbkdf2(System::String ^ password, cli::array <System::Byte> ^ salt, Microsoft::AspNetCore::Cryptography::KeyDerivation::KeyDerivationPrf prf, int iterationCount, int numBytesRequested);
public static byte[] Pbkdf2 (string password, byte[] salt, Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf prf, int iterationCount, int numBytesRequested);
static member Pbkdf2 : string * byte[] * Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf * int * int -> byte[]
Public Shared Function Pbkdf2 (password As String, salt As Byte(), prf As KeyDerivationPrf, iterationCount As Integer, numBytesRequested As Integer) As Byte()

參數

password
String

要從中衍生金鑰的密碼。

salt
Byte[]

金鑰衍生程式期間要使用的 Salt。

prf
KeyDerivationPrf

要用於金鑰衍生程式的虛擬隨機函式。

iterationCount
Int32

在金鑰衍生程式期間要套用之虛擬隨機函式的反復專案數目。

numBytesRequested
Int32

衍生索引鍵的位元組) 所需的長度 (。

傳回

Byte[]

所衍生金鑰。

備註

PBKDF2 演算法是在 RFC 2898 中指定。

適用於