PBKDF2Algorithms ALGORITHM-IDENTIFIER ::=
{ {PBKDF2-params IDENTIFIED BY id-PBKDF2}, ...}
id-PBKDF2 OBJECT IDENTIFIER ::= {pkcs-5 12}
PBKDF2-params ::= SEQUENCE {
salt CHOICE {
specified OCTET STRING,
otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}}
},
iterationCount INTEGER (1..MAX),
keyLength INTEGER (1..MAX) OPTIONAL,
prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT algid-hmacWithSHA1
}
PBKDF2-SaltSources ALGORITHM-IDENTIFIER ::= { ... }
PBKDF2-PRFs ALGORITHM-IDENTIFIER ::= {
{NULL IDENTIFIED BY id-hmacWithSHA1} |
{NULL IDENTIFIED BY id-hmacWithSHA224} |
{NULL IDENTIFIED BY id-hmacWithSHA256} |
{NULL IDENTIFIED BY id-hmacWithSHA384} |
{NULL IDENTIFIED BY id-hmacWithSHA512}, ... }
algid-hmacWithSHA1 AlgorithmIdentifier {{PBKDF2-PRFs}} ::=
{algorithm id-hmacWithSHA1, parameters NULL : NULL}
id-hmacWithSHA1 OBJECT IDENTIFIER ::= {digestAlgorithm 7}
For more information, see
RFC 8018:
PKCS #5: Password-Based Cryptography Specification.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int | |
| private final String | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| public | PBKDF2Parameters(DerValue
the DER encoding of the parameter block pBKDF2_params)Initialize PBKDF2Parameters from a DER encoded parameter block. |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | |
| public static byte[] | |
| public int | |
| public int | Returns: size of key generated by PBKDF2, or -1 if not found/setReturns size of key generated by PBKDF2, or -1 if not found/set. |
| public String | |
| public byte[] |
| iterationCount | back to summary |
|---|---|
| private final int iterationCount | |
| keyLength | back to summary |
|---|---|
| private final int keyLength | |
| prfAlgo | back to summary |
|---|---|
| private final String prfAlgo | |
| salt | back to summary |
|---|---|
| private final byte[] salt | |
| PBKDF2Parameters | back to summary |
|---|---|
| public PBKDF2Parameters(DerValue pBKDF2_params) throws IOException Initialize PBKDF2Parameters from a DER encoded parameter block.
| |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] salt, int iterationCount, int keyLength, String kdfHmac) | |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] salt, int iterationCount, int keyLength, ObjectIdentifier prf) | |
| getIterationCount | back to summary |
|---|---|
| public int getIterationCount() Returns the iteration count.
| |
| getKeyLength | back to summary |
|---|---|
| public int getKeyLength() Returns size of key generated by PBKDF2, or -1 if not found/set.
| |
| getPrfAlgo | back to summary |
|---|---|
| public String getPrfAlgo() Returns name of Hmac.
| |
| getSalt | back to summary |
|---|---|
| public byte[] getSalt() Returns the salt.
| |