Class EncryptOptions



  • public class EncryptOptions
    extends java.lang.Object
    The options for explicit encryption.
    Since:
    3.11
    • Constructor Summary

      Constructors 
      Constructor Description
      EncryptOptions​(java.lang.String algorithm)
      Construct an instance with the given algorithm.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm​()
      Gets the encryption algorithm, which must be either "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" or "AEAD_AES_256_CBC_HMAC_SHA_512-Random".
      java.lang.String getKeyAltName​()
      Gets the alternate name with which to look up the key.
      BsonBinary getKeyId​()
      Gets the key identifier.
      EncryptOptions keyAltName​(java.lang.String keyAltName)
      Sets the alternate key name
      EncryptOptions keyId​(BsonBinary keyId)
      Sets the key identifier
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EncryptOptions

        public EncryptOptions​(java.lang.String algorithm)
        Construct an instance with the given algorithm.
        Parameters:
        algorithm - the encryption algorithm
        See Also:
        getAlgorithm()
    • Method Detail

      • getAlgorithm

        public java.lang.String getAlgorithm​()
        Gets the encryption algorithm, which must be either "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" or "AEAD_AES_256_CBC_HMAC_SHA_512-Random".
        Returns:
        the encryption algorithm
      • getKeyId

        public BsonBinary getKeyId​()
        Gets the key identifier.

        Identifies the data key by its _id value. The value is a UUID (binary subtype 4).

        Returns:
        the key identifier
      • getKeyAltName

        public java.lang.String getKeyAltName​()
        Gets the alternate name with which to look up the key.

        Identifies the alternate key name to look up the key by.

        Returns:
        the alternate name
      • keyAltName

        public EncryptOptions keyAltName​(java.lang.String keyAltName)
        Sets the alternate key name
        Parameters:
        keyAltName - the alternate key name
        Returns:
        this
        See Also:
        getKeyAltName()
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object