DataProtector::Protect Method (array<Byte>^)

.NET Framework (current version)
 
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.

Protects the specified user data.

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

public:
array<unsigned char>^ Protect(
	array<unsigned char>^ userData
)

Parameters

userData
Type: array<System::Byte>^

The data to be protected.

Return Value

Type: array<System::Byte>^

A byte array that contains the encrypted data.

Exception Condition
ArgumentNullException

userData is null.

.NET Framework
Available since 4.5
Return to top
Show: