KeyVaultKey.wrapKeyAsync(byte[] plaintext, String algorithm) 方法

定义

Wraps (encrypts) the specified symmetric key material using the specified algorithm, or the keys DefaultKeyWrapAlgorithm if none is specified.

public ListenableFuture<Pair<byte[], String>> wrapKeyAsync(byte[] plaintext, String algorithm)

参数

key
byte []

The symmetric key to wrap

algorithm
String

The wrapping algorithm to use, defaults to the keys DefaultKeyWrapAlgorithm

返回

ListenableFuture<Pair<byte[], String>>

ListenableFuture containing the encrypted key and the algorithm that was used

例外

NoSuchAlgorithmException

the algorithm is not valid

替代

适用于