Class CommonsCryptoAESEncryptor
java.lang.Object
org.apache.hadoop.hbase.io.crypto.aes.CommonsCryptoAESEncryptor
- All Implemented Interfaces:
Encryptor
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private boolean
private byte[]
private Key
private Properties
private SecureRandom
-
Constructor Summary
ConstructorDescriptionCommonsCryptoAESEncryptor
(String cipherMode, Properties properties, SecureRandom rng) -
Method Summary
Modifier and TypeMethodDescriptionCreate a stream for encryptionint
Get the cipher's internal block sizebyte[]
getIv()
Get the initialization vectorint
Get the expected length for the initialization vectorvoid
reset()
Reset state, reinitialize with the key and ivvoid
setIv
(byte[] iv) Set the initialization vectorvoid
Set the secret key
-
Field Details
-
cipherMode
-
properties
-
key
-
iv
-
initialized
-
rng
-
-
Constructor Details
-
CommonsCryptoAESEncryptor
-
-
Method Details
-
setKey
Description copied from interface:Encryptor
Set the secret key -
getIvLength
Description copied from interface:Encryptor
Get the expected length for the initialization vector- Specified by:
getIvLength
in interfaceEncryptor
- Returns:
- the expected length for the initialization vector
-
getBlockSize
Description copied from interface:Encryptor
Get the cipher's internal block size- Specified by:
getBlockSize
in interfaceEncryptor
- Returns:
- the cipher's internal block size
-
getIv
Description copied from interface:Encryptor
Get the initialization vector -
setIv
Description copied from interface:Encryptor
Set the initialization vector -
createEncryptionStream
Description copied from interface:Encryptor
Create a stream for encryption- Specified by:
createEncryptionStream
in interfaceEncryptor
-
reset
Description copied from interface:Encryptor
Reset state, reinitialize with the key and iv
-