CryptoProviderFactory.CreateKeyWrapProvider(SecurityKey, String) Method
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.
Creates an instance of KeyWrapProvider for a specific key
and algorithm
.
public virtual Microsoft.IdentityModel.Tokens.KeyWrapProvider CreateKeyWrapProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm);
abstract member CreateKeyWrapProvider : Microsoft.IdentityModel.Tokens.SecurityKey * string -> Microsoft.IdentityModel.Tokens.KeyWrapProvider
override this.CreateKeyWrapProvider : Microsoft.IdentityModel.Tokens.SecurityKey * string -> Microsoft.IdentityModel.Tokens.KeyWrapProvider
Public Overridable Function CreateKeyWrapProvider (key As SecurityKey, algorithm As String) As KeyWrapProvider
- key
- SecurityKey
The SecurityKey to use.
- algorithm
- String
The algorithm to use.
An instance of KeyWrapProvider.
Thrown if algorithm
is null or empty.
Thrown if the combination of key
and algorithm
is not supported.
Thrown if the type returned by Create(String, Object[]) is not assignable to KeyWrapProvider.
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true, Create(String, Object[]) is called to obtain the KeyWrapProvider.
When you are finished with the KeyWrapProvider, call ReleaseKeyWrapProvider(KeyWrapProvider).
Product | Versions |
---|---|
Microsoft Identity Model | latest |