語言

RsaEncryptionCookieTransform 建構函式

定義

初始化 RsaEncryptionCookieTransform 類別的新執行個體。

多載

名稱 Description
RsaEncryptionCookieTransform(RSA)

初始化一個使用指定金鑰進行加密與解密的類別新實例 RsaEncryptionCookieTransform 。

RsaEncryptionCookieTransform(X509Certificate2)

初始化一個新的類別實例 RsaEncryptionCookieTransform ,使用指定 X.509 憑證的私密金鑰進行加密與解密。

RsaEncryptionCookieTransform(RSA)

初始化一個使用指定金鑰進行加密與解密的類別新實例 RsaEncryptionCookieTransform 。

public:
 RsaEncryptionCookieTransform(System::Security::Cryptography::RSA ^ key);
public RsaEncryptionCookieTransform(System.Security.Cryptography.RSA key);
new System.IdentityModel.RsaEncryptionCookieTransform : System.Security.Cryptography.RSA -> System.IdentityModel.RsaEncryptionCookieTransform
Public Sub New (key As RSA)

參數

key
RSA

作為預設加密與解密金鑰的金鑰。 初始化 DecryptionKeys 和 EncryptionKey 屬性。

例外狀況

key 是 null。

適用於

RsaEncryptionCookieTransform(X509Certificate2)

初始化一個新的類別實例 RsaEncryptionCookieTransform ,使用指定 X.509 憑證的私密金鑰進行加密與解密。

public:
 RsaEncryptionCookieTransform(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public RsaEncryptionCookieTransform(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.IdentityModel.RsaEncryptionCookieTransform : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.IdentityModel.RsaEncryptionCookieTransform
Public Sub New (certificate As X509Certificate2)

參數

certificate
X509Certificate2

該憑證的私鑰用於加密與解密。

該憑證的私鑰將作為預設的加密與解密金鑰。 初始化 DecryptionKeys 和 EncryptionKey 屬性。

例外狀況

certificate 是 null。

certificate 沒有私鑰。

-或-

私鑰不是 RSA。

適用於