public class PBES2ParameterSpec
extends javax.crypto.spec.PBEParameterSpec
| Constructor and Description |
|---|
PBES2ParameterSpec(AlgorithmID kdf,
AlgorithmID prf,
AlgorithmID enc)
The parameter specifications for PBES2 contains the password-based key
derivation function indicated with the PBKDF2 PRF and the specified
encryption scheme will be used.
|
PBES2ParameterSpec(byte[] salt,
int iterationCount,
AlgorithmID kdf,
AlgorithmID prf,
AlgorithmID enc,
byte[] iv)
Specify the parameter specifications for the PBES2 scheme.
|
PBES2ParameterSpec(int iterationCount)
When only the iteration count is provided, default PBKDF2 and the PBKDF2 PRF
HmacSHA256 and the default encryption scheme
AES-256-CBC will be used. |
PBES2ParameterSpec(javax.crypto.spec.PBEParameterSpec param_spec,
java.lang.String algorithmName) |
| Modifier and Type | Method and Description |
|---|---|
AlgorithmID |
getEnc()
Return the encryption scheme for the PBES2 parameter specifications.
|
byte[] |
getIV()
Return the IV byte array for the encryption scheme.
|
AlgorithmID |
getKDF()
Return the password-based key derivation function.
|
AlgorithmID |
getPRF()
Return the pseudo-random-function for the password-based key derivation.
|
ASN1Object |
toASN1Object()
Return the ASN1 representation of the PBES2 parameter specifications.
|
public PBES2ParameterSpec(int iterationCount)
HmacSHA256 and the default encryption scheme
AES-256-CBC will be used. The other parameters salt and iv will
be generated for the underlying encryption scheme.
salt - default to eight octets (64 bits) long.
iteration count - default to 10,000 and a minimum of 1,000 is recommended.
iterationCount - the iteration count to the password-based key
derivationpublic PBES2ParameterSpec(AlgorithmID kdf, AlgorithmID prf, AlgorithmID enc)
salt - default to eight octets (64 bits) long.
iteration count - default to 10,000 and a minimum of 1,000 is recommended.
kdf - the password-based key derivation functionprf - the pseudo-random function for the key derivation functionenc - the encryption schemepublic PBES2ParameterSpec(byte[] salt,
int iterationCount,
AlgorithmID kdf,
AlgorithmID prf,
AlgorithmID enc,
byte[] iv)
salt - it should be at least eight octets (64 bits) long.
iteration count - a minimum of 1,000 is recommended.
Key Derivation Function - PBKDF2 is recommended for new application.
Pseudo-random Functions - include HMAC with SHA-1, SHA-224, SHA-256, SHA-384, SHA512, SHA-512/224 and SHA-512/256.
Encryption Schemes - an underlying encryption scheme Encryption Schemes such as AES-CBC-Pad.
iv - Iv parameter specification for the encryption cipher must match the cipher block size.
salt - the salt to the password-based key derivationiterationCount - the iteration count to the password-based key
derivationkdf - the password-based key derivation functionprf - the pseudo-random function for the key derivation
functionenc - the encryption schemeiv - the IV for the encryption schemepublic PBES2ParameterSpec(javax.crypto.spec.PBEParameterSpec param_spec,
java.lang.String algorithmName)
public ASN1Object toASN1Object()
public final AlgorithmID getKDF()
public final AlgorithmID getPRF()
public final AlgorithmID getEnc()
public final byte[] getIV()