DataProtector.Protect Method (Byte[])

.NET Framework (current version)
 

Protects the specified user data.

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

public byte[] Protect(
	byte[] userData
)

Parameters

userData
Type: System.Byte[]

The data to be protected.

Return Value

Type: 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: