Edit

Share via


PasswordDeriveBytes.GetBytes(Int32) Method

Definition

Caution

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

Returns pseudo-random key bytes.

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()

Parameters

cb
Int32

The number of pseudo-random key bytes to generate.

Returns

Byte[]

A byte array filled with pseudo-random key bytes.

Attributes

Remarks

This method can create any number of pseudo-random bytes. However, the strength of the byte sequence is limited by the number of bytes in the hash output.

Applies to

See also