Interface AsyncPropertyEncryption
- All Superinterfaces:
BasePropertyEncryption
- All Known Implementing Classes:
InternalAsyncPropertyEncryption
@Preview(name="Property Encryption")
public interface AsyncPropertyEncryption
extends BasePropertyEncryption
Provides Neo4j Property Encryption asynchronous functions.
- Since:
- 6.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondecryptAsync(PropertyDecryptionRequest decryptionRequest) Decrypts the value according to the providedPropertyDecryptionRequest.CompletionStage<byte[]> encryptToBytesAsync(PropertyEncryptionRequest encryptionRequest) Encrypts the value according to the providedPropertyEncryptionRequest.default AsyncEncapsulatedKeyManagerReturns the key manager.keyManager(String profileName) Returns the key manager for the specified property encryption profile.
-
Method Details
-
encryptToBytesAsync
Encrypts the value according to the providedPropertyEncryptionRequest.- Parameters:
encryptionRequest- the encryption request, must not be null- Returns:
- a
CompletionStagethat completes with the encrypted bytes
-
decryptAsync
Decrypts the value according to the providedPropertyDecryptionRequest.- Parameters:
decryptionRequest- the decryption request, must not be null- Returns:
- a
CompletionStagethat completes with the decrypted value
-
keyManager
Returns the key manager.If this instance has been configured with a single property encryption profile, the key manager for that profile is returned. This method MUST NOT be used when multiple profiles are configured.
- Returns:
- the key manager
- Throws:
IllegalStateException- if key management is not supported by the specified profile or when no profile is enabled
-
keyManager
Returns the key manager for the specified property encryption profile.- Parameters:
profileName- the profile name, may be null when only a single profile is configured- Returns:
- the key manager
- Throws:
IllegalStateException- if key management is not supported by the specified profile or when no profile with the supplied name is found
-