Package org.apache.cassandra.security
Class EncryptionContext
- java.lang.Object
-
- org.apache.cassandra.security.EncryptionContext
-
public class EncryptionContext extends java.lang.ObjectA (largely) immutable wrapper for the application-wide file-level encryption settings.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENCRYPTION_CIPHERstatic java.lang.StringENCRYPTION_IVstatic java.lang.StringENCRYPTION_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 EncryptionContextcreateFromMap(java.util.Map<?,?> parameters, EncryptionContext encryptionContext)If encryption headers are found in theparameters, those headers are merged with the application-wideencryptionContext.booleanequals(java.lang.Object o)booleanequals(EncryptionContext other)intgetChunkLength()ICompressorgetCompressor()javax.crypto.CiphergetDecryptor()javax.crypto.CiphergetEncryptor()byte[]getIV()TransparentDataEncryptionOptionsgetTransparentDataEncryptionOptions()booleanisEnabled()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:
equalsin 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.
-
-