Class LocalKeyEncapsulationService
java.lang.Object
org.neo4j.driver.internal.encryption.LocalKeyEncapsulationService
- All Implemented Interfaces:
AsyncKeyEncapsulationService, BaseKeyEncapsulationService
public final class LocalKeyEncapsulationService
extends Object
implements AsyncKeyEncapsulationService
-
Constructor Summary
ConstructorsConstructorDescriptionLocalKeyEncapsulationService(SecretKey masterKey, Provider provider, SecureRandom secureRandomIV) -
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.
-
Constructor Details
-
LocalKeyEncapsulationService
public LocalKeyEncapsulationService(SecretKey masterKey, Provider provider, SecureRandom secureRandomIV) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
-
Method Details
-
encapsulateAsync
Description copied from interface:AsyncKeyEncapsulationServiceCreates a new key, encapsulates it and returns the result.- Specified by:
encapsulateAsyncin interfaceAsyncKeyEncapsulationService- Parameters:
options- the encapsulation options- Returns:
- a
CompletionStagethat completes with the encapsulation result
-
decapsulateAsync
public CompletionStage<SecretKey> decapsulateAsync(byte[] encapsulation, Map<String, String> metadata) Description copied from interface:AsyncKeyEncapsulationServiceDecapsulates encapsulated bytes.- Specified by:
decapsulateAsyncin interfaceAsyncKeyEncapsulationService- Parameters:
encapsulation- the encapsulated bytes, must not benullmetadata- the key metadata, must not benull- Returns:
- a
CompletionStagethat completes with the decapsulated key
-