Partager via


AsyncKeyEncryptionKey Interface

public interface AsyncKeyEncryptionKey

The AsyncKeyEncryptionKey defines asynchronous methods for encrypting and decrypting keys, also known as key wrapping and unwrapping. It also supports signing and verifying data using the configured key.

Method Summary

Modifier and Type Method and Description
abstract Mono<String> getKeyId()

Retrieves the key identifier.

abstract Mono<byte[]> unwrapKey(String algorithm, byte[] encryptedKey)

Decrypts the specified encrypted key using the specified algorithm.

abstract Mono<byte[]> wrapKey(String algorithm, byte[] key)

Encrypts the specified key using the specified algorithm.

Method Details

getKeyId

public abstract Mono getKeyId()

Retrieves the key identifier.

Returns:

A Mono containing key identifier.

unwrapKey

public abstract Mono unwrapKey(String algorithm, byte[] encryptedKey)

Decrypts the specified encrypted key using the specified algorithm.

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.

wrapKey

public abstract Mono wrapKey(String algorithm, byte[] key)

Encrypts the specified key using the specified algorithm.

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.

Applies to