Class AESEncryptor
java.lang.Object
org.apache.hadoop.hbase.io.crypto.aes.AESEncryptor
- All Implemented Interfaces:
Encryptor
-
Field Summary
Modifier and TypeFieldDescriptionprivate Cipher
private boolean
private byte[]
private Key
private SecureRandom
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a stream for encryptionint
Get the cipher's internal block size(package private) Cipher
byte[]
getIv()
Get the initialization vectorint
Get the expected length for the initialization vectorprotected void
init()
void
reset()
Reset state, reinitialize with the key and ivvoid
setIv
(byte[] iv) Set the initialization vectorvoid
Set the secret key
-
Field Details
-
cipher
-
rng
-
key
-
iv
-
initialized
-
-
Constructor Details
-
AESEncryptor
-
-
Method Details
-
getCipher
-
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 -
init
-