public class AesCipherUtil extends Object
| Constructor and Description |
|---|
AesCipherUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
derivePasswordBasedKey(byte[] salt,
char[] password,
AesKeyStrength aesKeyStrength)
Derive Password-Based Key for AES according to AE-1 and AE-2 Specifications
|
static byte[] |
derivePasswordVerifier(byte[] derivedKey,
AesKeyStrength aesKeyStrength)
Derive Password Verifier using Derived Key and requested AES Key Strength
|
static AESEngine |
getAESEngine(byte[] derivedKey,
AesKeyStrength aesKeyStrength)
Get AES Engine using derived key and requested AES Key Strength
|
static MacBasedPRF |
getMacBasedPRF(byte[] derivedKey,
AesKeyStrength aesKeyStrength)
Get MAC-Based PRF using default HMAC Algorithm defined in AE-1 and AE-2 Specification
|
static void |
prepareBuffAESIVBytes(byte[] buff,
int nonce) |
public static byte[] derivePasswordBasedKey(byte[] salt,
char[] password,
AesKeyStrength aesKeyStrength)
throws ZipException
salt - Salt used for PBKDF2password - Password used for PBKDF2 containing characters matching ISO-8859-1 character setaesKeyStrength - Requested AES Key and MAC StrengthZipException - Thrown when Derived Key is not validpublic static byte[] derivePasswordVerifier(byte[] derivedKey,
AesKeyStrength aesKeyStrength)
derivedKey - Derived KeyaesKeyStrength - AES Key Strengthpublic static MacBasedPRF getMacBasedPRF(byte[] derivedKey, AesKeyStrength aesKeyStrength)
derivedKey - Derived KeyaesKeyStrength - AES Key Strengthpublic static AESEngine getAESEngine(byte[] derivedKey, AesKeyStrength aesKeyStrength) throws ZipException
derivedKey - Derived KeyaesKeyStrength - AES Key StrengthZipException - Thrown on AESEngine initialization failurespublic static void prepareBuffAESIVBytes(byte[] buff,
int nonce)
Copyright © 2021. All rights reserved.