Class AESEncryptor
java.lang.Object
org.apache.hadoop.hbase.io.crypto.aes.AESEncryptor
- All Implemented Interfaces:
Encryptor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Cipherprivate booleanprivate byte[]private Keyprivate SecureRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a stream for encryptionintGet the cipher's internal block size(package private) Cipherbyte[]getIv()Get the initialization vectorintGet the expected length for the initialization vectorprotected voidinit()voidreset()Reset state, reinitialize with the key and ivvoidsetIv(byte[] iv) Set the initialization vectorvoidSet the secret key
-
Field Details
-
cipher
-
rng
-
key
-
iv
-
initialized
-
-
Constructor Details
-
AESEncryptor
-
-
Method Details
-
getCipher
-
setKey
Description copied from interface:EncryptorSet the secret key -
getIvLength
Description copied from interface:EncryptorGet the expected length for the initialization vector- Specified by:
getIvLengthin interfaceEncryptor- Returns:
- the expected length for the initialization vector
-
getBlockSize
Description copied from interface:EncryptorGet the cipher's internal block size- Specified by:
getBlockSizein interfaceEncryptor- Returns:
- the cipher's internal block size
-
getIv
Description copied from interface:EncryptorGet the initialization vector -
setIv
Description copied from interface:EncryptorSet the initialization vector -
createEncryptionStream
Description copied from interface:EncryptorCreate a stream for encryption- Specified by:
createEncryptionStreamin interfaceEncryptor
-
reset
Description copied from interface:EncryptorReset state, reinitialize with the key and iv -
init
-