Package 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 Description static java.lang.String
ENCRYPTION_CIPHER
static java.lang.String
ENCRYPTION_IV
static java.lang.String
ENCRYPTION_KEY_ALIAS
-
Constructor Summary
Constructors Constructor 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 Description static EncryptionContext
createFromMap(java.util.Map<?,?> parameters, EncryptionContext encryptionContext)
If encryption headers are found in theparameters
, those headers are merged with the application-wideencryptionContext
.boolean
equals(java.lang.Object o)
boolean
equals(EncryptionContext other)
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()
-
-
-
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 classjava.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 theparameters
, those headers are merged with the application-wideencryptionContext
.
-
-