org.apache.cassandra.security

## Class EncryptionContext

- java.lang.Object
- - org.apache.cassandra.security.EncryptionContext

-     public class EncryptionContext
      extends java.lang.Object

  A (largely) immutable wrapper for the application-wide file-level encryption settings.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ENCRYPTION_CIPHER`
    `static java.lang.String` | `ENCRYPTION_IV`
    `static java.lang.String` | `ENCRYPTION_KEY_ALIAS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncryptionContext()`
    `EncryptionContext(TransparentDataEncryptionOptions tdeOptions)`
    `EncryptionContext(TransparentDataEncryptionOptions tdeOptions, byte[] iv, boolean init)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EncryptionContext` | `createFromMap(java.util.Map<?,?> parameters, EncryptionContext encryptionContext)` If encryption headers are found in the `parameters`, those headers are merged with the application-wide `encryptionContext`.
    `boolean` | `equals(EncryptionContext other)`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `getChunkLength()`
    `ICompressor` | `getCompressor()`
    `javax.crypto.Cipher` | `getDecryptor()`
    `javax.crypto.Cipher` | `getEncryptor()`
    `byte[]` | `getIV()`
    `TransparentDataEncryptionOptions` | `getTransparentDataEncryptionOptions()`
    `boolean` | `isEnabled()`
    `java.util.Map<java.lang.String,java.lang.String>` | `toHeaderParameters()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ENCRYPTION_CIPHER

          public static final java.lang.String ENCRYPTION_CIPHER

      See Also:
        Constant Field Values

    - #### ENCRYPTION_KEY_ALIAS

          public static final java.lang.String ENCRYPTION_KEY_ALIAS

      See Also:
        Constant Field Values

    - #### ENCRYPTION_IV

          public static final java.lang.String ENCRYPTION_IV

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EncryptionContext

          public EncryptionContext()

    - #### EncryptionContext

          public EncryptionContext(TransparentDataEncryptionOptions tdeOptions)

    - #### EncryptionContext

          public EncryptionContext(TransparentDataEncryptionOptions tdeOptions,
                                   byte[] iv,
                                   boolean init)

  - ### Method Detail

    - #### getCompressor

          public ICompressor getCompressor()

    - #### getEncryptor

          public javax.crypto.Cipher getEncryptor()
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getDecryptor

          public javax.crypto.Cipher getDecryptor()
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### isEnabled

          public boolean isEnabled()

    - #### getChunkLength

          public int getChunkLength()

    - #### getIV

          public byte[] getIV()

    - #### getTransparentDataEncryptionOptions

          public TransparentDataEncryptionOptions getTransparentDataEncryptionOptions()

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### equals

          public boolean equals(EncryptionContext other)

    - #### toHeaderParameters

          public java.util.Map<java.lang.String,java.lang.String> toHeaderParameters()

    - #### createFromMap

          public static EncryptionContext createFromMap(java.util.Map<?,?> parameters,
                                                        EncryptionContext encryptionContext)

      If encryption headers are found in the `parameters`, those headers are merged with the application-wide `encryptionContext`.

Copyright © 2018 The Apache Software Foundation