Class KeyEncryptionKeyAsyncClient

java.lang.Object
com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient
com.azure.security.keyvault.keys.cryptography.KeyEncryptionKeyAsyncClient
All Implemented Interfaces:
AsyncKeyEncryptionKey

public final class KeyEncryptionKeyAsyncClient extends CryptographyAsyncClient implements AsyncKeyEncryptionKey
A key client which is used to asynchronously wrap or unwrap another key.
  • Method Details

    • getKeyId

      public Mono<String> getKeyId()
      Get the identifier of the key to use for cryptography operations.
      Specified by:
      getKeyId in interface AsyncKeyEncryptionKey
      Returns:
      A Mono containing the key identifier.
    • wrapKey

      public Mono<byte[]> wrapKey(String algorithm, byte[] key)
      Encrypts the specified key using the specified algorithm.
      Specified by:
      wrapKey in interface AsyncKeyEncryptionKey
      Parameters:
      algorithm - The key wrap algorithm used to encrypt the specified key.
      key - The key content to be encrypted.
      Returns:
      A Mono containing the encrypted key bytes.
    • unwrapKey

      public Mono<byte[]> unwrapKey(String algorithm, byte[] encryptedKey)
      Decrypts the specified encrypted key using the specified algorithm.
      Specified by:
      unwrapKey in interface AsyncKeyEncryptionKey
      Parameters:
      algorithm - The key wrap algorithm which was used to encrypt the specified encrypted key.
      encryptedKey - The encrypted key content to be decrypted.
      Returns:
      A Mono containing the decrypted key bytes.