语言

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

CryptographyClient.SecureWrapKey Method

Definition

Wraps the specified key using secure wrap.

public virtual Azure.Security.KeyVault.Keys.Cryptography.SecureWrapResult SecureWrapKey(Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm algorithm, System.Threading.CancellationToken cancellationToken = default);
abstract member SecureWrapKey : Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SecureWrapResult
override this.SecureWrapKey : Azure.Security.KeyVault.Keys.Cryptography.SecureKeyWrapAlgorithm * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.SecureWrapResult
Public Overridable Function SecureWrapKey (algorithm As SecureKeyWrapAlgorithm, Optional cancellationToken As CancellationToken = Nothing) As SecureWrapResult

Parameters

cancellationToken
CancellationToken

A CancellationToken to cancel the operation.

Returns

The result of the secure wrap operation. The returned SecureWrapResult contains the wrapped key along with all other information needed to unwrap it. This information should be stored with the wrapped 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.

Applies to