Редагувати

Поділитися через


RsaSignatureCookieTransform Class

Definition

Provides cookie integrity using an RSA signature.

public ref class RsaSignatureCookieTransform : System::IdentityModel::CookieTransform
public class RsaSignatureCookieTransform : System.IdentityModel.CookieTransform
type RsaSignatureCookieTransform = class
    inherit CookieTransform
Public Class RsaSignatureCookieTransform
Inherits CookieTransform
Inheritance
RsaSignatureCookieTransform

Remarks

RsaSignatureCookieTransform adds an RSA MAC to the cookie data. This provides integrity but not confidentiality. By default, the MAC uses SHA-256, but SHA-1 may be requested.

Cookies protected with this transform may be read by any computer that shares the same RSA private key (generally associated with an X509 certificate).

Important

When using the RsaSignatureCookieTransform with a service, if a key provided by a certificate changes the service must be restarted.

Constructors

RsaSignatureCookieTransform(RSA)

Initializes a new instance of the RsaSignatureCookieTransform class by using the specified RSA key.

RsaSignatureCookieTransform(X509Certificate2)

Initializes a new instance of the RsaSignatureCookieTransform class by using the private key of the specified certificate.

Properties

HashName

Gets or sets the name of the hash algorithm to use.

SigningKey

Gets or sets the RSA key that is used for signing.

VerificationKeys

Gets the collection of keys used for signature verification.

By default, this property returns a list that contains only the signing key.

Methods

Decode(Byte[])

Verifies the specified signature and returns the original, unsigned data.

Encode(Byte[])

Signs the specified data.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also