RsaSignatureCookieTransform.Encode Method (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.

Signs the specified data.

Namespace:   System.IdentityModel
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public override byte[] Encode(
	byte[] value
)

Parameters

value
Type: System.Byte[]

The data to be signed.

Return Value

Type: System.Byte[]

The signed data.

Exception Condition
ArgumentNullException

value is null.

ArgumentException

value contains zero bytes.

InvalidOperationException

The SigningKey property is null.

-or-

The key specified by the SigningKey property is not assignable as RSACryptoServiceProvider.

-or-

The key specified by the SigningKey property does not contain a private key.

NotSupportedException

The operating system does not support the specified algorithm.

The key specified by the SigningKey property must include the private key in order to sign the data.

The signed data may be verified by calling the Decode method.

.NET Framework
Available since 4.5
Return to top
Show: