Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Tokens.​SymmetricKeyWrapProvider

Assembly: Microsoft.IdentityModel.Tokens

Inheritance: object → KeyWrapProvider → SymmetricKeyWrapProvider

Implemented Interfaces

Provides Wrap and Unwrap key services.

Properties

public string
Algorithm
Gets the KeyWrap algorithm that is being used.
public string
Context
Gets or sets a user context for a <see cref="T:Microsoft.IdentityModel.Tokens.KeyWrapProvider" /> .
Remarks This is null by default. This can be used by runtimes or for extensibility scenarios.
public SecurityKey
Key
Gets the <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> that is being used.

Methods

protected void
Dispose​(bool disposing)
Releases the resources used by the current instance.
disposing If true, release both managed and unmanaged resources; otherwise, release only unmanaged resources.
GetSymmetricAlgorithm​(SecurityKey key, string algorithm)
Returns the <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> .
Returns The initialized <see cref="T:System.Security.Cryptography.SymmetricAlgorithm" /> .
key The <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> that will be used for cryptographic operations.
algorithm The encryption algorithm to be used.
protected bool
IsSupportedAlgorithm​(SecurityKey key, string algorithm)
Determines whether the specified algorithm is supported.
Returns <see langword="true" /> if the algorithm is supported; otherwise, <see langword="false" /> .
key The <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> to use for cryptographic operations.
algorithm The algorithm to check for support.
public byte[]
UnwrapKey​(byte[] keyBytes)
Unwraps a key using symmetric decryption.
Returns The unwrapped key.
keyBytes The bytes to unwrap.
public byte[]
WrapKey​(byte[] keyBytes)
Wraps a key using symmetric encryption.
Returns The wrapped key.
keyBytes The key to be wrapped.
public void
Dispose​()
Inherited from KeyWrapProvider
Calls <see cref="M:Microsoft.IdentityModel.Tokens.KeyWrapProvider.Dispose(System.Boolean)" /> and <see cref="M:System.GC.SuppressFinalize(System.Object)" /> .
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object