CryptographyClient.SecureUnwrapKeyAsync Method
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.
Unwraps the specified wrapped key using secure unwrap.
public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.SecureUnwrapResult> SecureUnwrapKeyAsync(Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm algorithm, byte[] encryptedKey, string targetAttestationToken, System.Threading.CancellationToken cancellationToken = default);
abstract member SecureUnwrapKeyAsync : Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm * byte[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.SecureUnwrapResult>
override this.SecureUnwrapKeyAsync : Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm * byte[] * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.SecureUnwrapResult>
Public Overridable Function SecureUnwrapKeyAsync (algorithm As SecureKeyWrapAlgorithm, encryptedKey As Byte(), targetAttestationToken As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SecureUnwrapResult)
Parameters
- algorithm
- SecureKeyWrapAlgorithm
The SecureKeyWrapAlgorithm to use.
- encryptedKey
- Byte[]
The encrypted key bytes to unwrap.
- targetAttestationToken
- String
The target attestation token for the unwrap operation.
- cancellationToken
- CancellationToken
A CancellationToken to cancel the operation.
Returns
The result of the unwrap operation. The returned SecureUnwrapResult contains the unwrapped key along with all other information needed to identify it. This information should be stored with the unwrapped key.
Exceptions
The specified algorithm does not match the key corresponding to the key identifier.
The local cryptographic provider threw an exception.
The key is invalid for the current operation.
The operation is not supported with the specified key.
The server returned an error. See Message for details returned from the server.