RsaKeyWrapProvider(SecurityKey, String, Boolean) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.