RsaSignatureCookieTransform.Encode(Byte[]) Method

Definition

Signs the specified data.

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

Parameters

value
Byte[]

The data to be signed.

Returns

Byte[]

The signed data.

Exceptions

value is null.

value contains zero bytes.

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.

The operating system does not support the specified algorithm.

Remarks

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.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1