Class AES256Options
- java.lang.Object
-
- org.apache.commons.compress.archivers.sevenz.AES256Options
-
final class AES256Options extends java.lang.Object
Options forSevenZMethod.AES256SHA256
encoder- Since:
- 1.23
- See Also:
AES256SHA256Decoder
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
ALGORITHM
private javax.crypto.Cipher
cipher
private byte[]
iv
private int
numCyclesPower
private byte[]
salt
(package private) static java.lang.String
TRANSFORMATION
-
Constructor Summary
Constructors Constructor Description AES256Options(char[] password)
AES256Options(char[] password, byte[] salt, byte[] iv, int numCyclesPower)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) javax.crypto.Cipher
getCipher()
(package private) byte[]
getIv()
(package private) int
getNumCyclesPower()
(package private) byte[]
getSalt()
(package private) static javax.crypto.spec.SecretKeySpec
newSecretKeySpec(byte[] bytes)
private static byte[]
randomBytes(int size)
-
-
-
Field Detail
-
ALGORITHM
static final java.lang.String ALGORITHM
- See Also:
- Constant Field Values
-
TRANSFORMATION
static final java.lang.String TRANSFORMATION
- See Also:
- Constant Field Values
-
salt
private final byte[] salt
-
iv
private final byte[] iv
-
numCyclesPower
private final int numCyclesPower
-
cipher
private final javax.crypto.Cipher cipher
-
-
Constructor Detail
-
AES256Options
public AES256Options(char[] password)
- Parameters:
password
- password used for encryption
-
AES256Options
public AES256Options(char[] password, byte[] salt, byte[] iv, int numCyclesPower)
- Parameters:
password
- password used for encryptionsalt
- for password hash salting (enforce password security)iv
- Initialization Vector (IV) used by cipher algorithmnumCyclesPower
- another password security enforcer parameter that controls the cycles of password hashing. More the this number is high, more security you'll have but also high CPU usage
-
-