共用方式為


PasswordDeriveBytes.GetBytes(Int32) 方法

定義

警告

Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.

傳回似隨機金鑰位元組。

public:
 override cli::array <System::Byte> ^ GetBytes(int cb);
[System.Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
public override byte[] GetBytes (int cb);
public override byte[] GetBytes (int cb);
[<System.Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")>]
override this.GetBytes : int -> byte[]
override this.GetBytes : int -> byte[]
Public Overrides Function GetBytes (cb As Integer) As Byte()

參數

cb
Int32

要產生的似隨機金鑰位元組數量。

傳回

Byte[]

位元組陣列,以虛擬隨機金鑰位元組填入。

屬性

備註

這個方法可以建立任意數目的虛擬隨機位元組。 不過,位元組序列的強度受限於哈希輸出中的位元組數目。

適用於

另請參閱