PasswordDeriveBytes.GetBytes Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

obsoleteCodeEntityM:System.Security.Cryptography.Rfc2898DeriveBytes.GetBytes(System.Int32) Note: This API is now obsolete.

Returns pseudo-random key bytes.

Namespace:   System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

[ObsoleteAttribute("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
public override byte[] GetBytes(
	int cb
)

Parameters

cb
Type: System.Int32

The number of pseudo-random key bytes to generate.

Return Value

Type: System.Byte[]

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.

.NET Framework
Available since 1.1
Return to top
Show: