Interface PropertyEncryption

All Superinterfaces:
BasePropertyEncryption
All Known Implementing Classes:
InternalPropertyEncryption

@Preview(name="Property Encryption") public interface PropertyEncryption extends BasePropertyEncryption
Provides Neo4j Property Encryption functions.
Since:
6.3.0
See Also:
  • Method Details

    • encryptToBytes

      byte[] encryptToBytes(PropertyEncryptionRequest encryptionRequest)
      Encrypts the value according to the provided PropertyEncryptionRequest.
      Parameters:
      encryptionRequest - the encryption request, must not be null
      Returns:
      the encoded encrypted value with its metadata
    • decrypt

      Value decrypt(PropertyDecryptionRequest decryptionRequest)
      Decrypts the value according to the provided PropertyDecryptionRequest.
      Parameters:
      decryptionRequest - the decryption request, must not be null
      Returns:
      the decrypted value
    • keyManager

      default EncapsulatedKeyManager 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

      EncapsulatedKeyManager keyManager(String profileName)
      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