RsaKeyWrapProvider(SecurityKey, String, Boolean) Constructor

Definition

Initializes a new instance of the RsaKeyWrapProvider class used for wrapping and unwrapping keys. These keys are usually symmetric session keys that are wrapped using the recipient's public key.

public RsaKeyWrapProvider (Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willUnwrap);
new Microsoft.IdentityModel.Tokens.RsaKeyWrapProvider : Microsoft.IdentityModel.Tokens.SecurityKey * string * bool -> Microsoft.IdentityModel.Tokens.RsaKeyWrapProvider
Public Sub New (key As SecurityKey, algorithm As String, willUnwrap As Boolean)

Parameters

key
SecurityKey

The SecurityKey that will be used for cryptographic operations.

algorithm
String

The KeyWrap algorithm to be used.

willUnwrap
Boolean

Whether this RsaKeyWrapProvider is required to unwrap keys. If true, the private key is required.

Exceptions

Thrown if algorithm is null.

Thrown if the SecurityKey and algorithm pair are not supported.

Thrown if failed to create RSA algorithm with the provided key and algorithm.

Applies to