Edit

Share via


RsaSignatureCookieTransform.Encode(Byte[]) Method

Definition

Signs the specified data.

public:
 override cli::array <System::Byte> ^ Encode(cli::array <System::Byte> ^ value);
public override byte[] Encode (byte[] value);
override this.Encode : byte[] -> byte[]
Public Overrides Function Encode (value As Byte()) As Byte()

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