Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PasswordDeriveBytes::GetBytes Method (Int32)

 
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)

public:
[ObsoleteAttribute("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
virtual array<unsigned char>^ GetBytes(
	int cb
) override

Parameters

cb
Type: System::Int32

The number of pseudo-random key bytes to generate.

Return Value

Type: array<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:
© 2017 Microsoft