Package net.lingala.zip4j.model.enums
Enum AesKeyStrength
- All Implemented Interfaces:
Serializable
,Comparable<AesKeyStrength>
Indicates the AES encryption key length
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription128-bit AES key length192-bit AES key length256-bit AES key length -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
private int
private int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AesKeyStrength
(int rawCode, int saltLength, int macLength, int keyLength) -
Method Summary
Modifier and TypeMethodDescriptionstatic AesKeyStrength
getAesKeyStrengthFromRawCode
(int code) Get a AesKeyStrength given a code from the ZIP fileint
Get the key length in bytes that this AesKeyStrength representsint
int
Get the code written to the ZIP fileint
static AesKeyStrength
Returns the enum constant of this type with the specified name.static AesKeyStrength[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
KEY_STRENGTH_128
128-bit AES key length -
KEY_STRENGTH_192
192-bit AES key length -
KEY_STRENGTH_256
256-bit AES key length
-
-
Field Details
-
rawCode
private int rawCode -
saltLength
private int saltLength -
macLength
private int macLength -
keyLength
private int keyLength
-
-
Constructor Details
-
AesKeyStrength
private AesKeyStrength(int rawCode, int saltLength, int macLength, int keyLength)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getRawCode
public int getRawCode()Get the code written to the ZIP file- Returns:
- the code written the ZIP file
-
getSaltLength
public int getSaltLength() -
getMacLength
public int getMacLength() -
getKeyLength
public int getKeyLength()Get the key length in bytes that this AesKeyStrength represents- Returns:
- the key length in bytes
-
getAesKeyStrengthFromRawCode
Get a AesKeyStrength given a code from the ZIP file- Parameters:
code
- the code from the ZIP file- Returns:
- the AesKeyStrength that represents the given code, or null if the code does not match
-