Interface AsyncKeyEncapsulationService
- All Superinterfaces:
BaseKeyEncapsulationService
- All Known Implementing Classes:
DelegatingAsyncKeyEncapsulationService, LocalKeyEncapsulationService
@Preview(name="Property Encryption")
public non-sealed interface AsyncKeyEncapsulationService
extends BaseKeyEncapsulationService
A service responsible for encapsulating and decapsulating keys.
Implementations MUST be non-blocking. In particular, implementations MUST NOT perform blocking operations on the calling thread.
Implementations MUST supply 256-bit AES keys only.
- Since:
- 6.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondecapsulateAsync(byte[] encapsulation, Map<String, String> metadata) Decapsulates encapsulated bytes.encapsulateAsync(KeyEncapsulationOptions options) Creates a new key, encapsulates it and returns the result.
-
Method Details
-
encapsulateAsync
Creates a new key, encapsulates it and returns the result.- Parameters:
options- the encapsulation options- Returns:
- a
CompletionStagethat completes with the encapsulation result
-
decapsulateAsync
Decapsulates encapsulated bytes.- Parameters:
encapsulation- the encapsulated bytes, must not benullmetadata- the key metadata, must not benull- Returns:
- a
CompletionStagethat completes with the decapsulated key
-