Class AESCryptoService
- java.lang.Object
-
- org.apache.accumulo.core.spi.crypto.AESCryptoService
-
- All Implemented Interfaces:
CryptoService
public class AESCryptoService extends Object implements CryptoService
Example implementation of AES encryption for Accumulo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AESCryptoService.AESCBCCryptoModule
class
AESCryptoService.AESGCMCryptoModule
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.crypto.CryptoService
CryptoService.CryptoException
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENCRYPT_ENABLED_PROPERTY
static String
KEY_URI_PROPERTY
-
Constructor Summary
Constructors Constructor Description AESCryptoService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Key
generateKey(SecureRandom random, int size)
FileDecrypter
getFileDecrypter(CryptoEnvironment environment)
Initialize the FileDecrypter for the environment and return.FileEncrypter
getFileEncrypter(CryptoEnvironment environment)
Initialize the FileEncrypter for the environment and return.void
init(Map<String,String> conf)
Initialize CryptoService.static Key
loadKekFromUri(String keyId)
static Key
unwrapKey(byte[] fek, Key kek)
static byte[]
wrapKey(Key fek, Key kek)
-
-
-
Field Detail
-
KEY_URI_PROPERTY
public static final String KEY_URI_PROPERTY
- See Also:
- Constant Field Values
-
ENCRYPT_ENABLED_PROPERTY
public static final String ENCRYPT_ENABLED_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Map<String,String> conf) throws CryptoService.CryptoException
Description copied from interface:CryptoService
Initialize CryptoService. This should only be called once.- Specified by:
init
in interfaceCryptoService
- Throws:
CryptoService.CryptoException
-
getFileEncrypter
public FileEncrypter getFileEncrypter(CryptoEnvironment environment)
Description copied from interface:CryptoService
Initialize the FileEncrypter for the environment and return. This will get called once per R-File or Write Ahead Log. FileEncrypter implementation must be thread safe.- Specified by:
getFileEncrypter
in interfaceCryptoService
-
getFileDecrypter
public FileDecrypter getFileDecrypter(CryptoEnvironment environment)
Description copied from interface:CryptoService
Initialize the FileDecrypter for the environment and return. This will get called once per R-File or Write Ahead Log. FileDecrypter implementation must be thread safe.- Specified by:
getFileDecrypter
in interfaceCryptoService
-
generateKey
public static Key generateKey(SecureRandom random, int size)
-
-