This documentation is archived and is not being maintained.

PasswordDeriveBytes.GetBytes Method

Returns pseudo-random key bytes.

[Visual Basic]
Overrides Public Function GetBytes( _
   ByVal cb As Integer _
) As Byte()
public override byte[] GetBytes(
 int cb
public: unsigned char GetBytes(
 int cb
)  __gc[];
public override function GetBytes(
   cb : int
) : Byte[];


The number of pseudo-random key bytes to generate.

Return Value

A byte array filled with pseudo-random key bytes.


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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

PasswordDeriveBytes Class | PasswordDeriveBytes Members | System.Security.Cryptography Namespace | Cryptographic Services