|
|||||||||
| Home >> All >> javax >> crypto >> [ spec overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.crypto.spec
Class PBEKeySpec

java.lang.Objectjavax.crypto.spec.PBEKeySpec
- All Implemented Interfaces:
- java.security.spec.KeySpec
- public class PBEKeySpec
- extends java.lang.Object
- implements java.security.spec.KeySpec
- extends java.lang.Object
A wrapper for a password-based key, used for password-based encryption (PBE).
Examples of password-based encryption algorithms include:
- PKCS #5 - Password-Based Cryptography Standard
- PKCS #12 - Personal Information Exchange Syntax Standard
- Since:
- 1.4
| Field Summary | |
private int |
iterationCount
The iteration count. |
private int |
keyLength
The generated key length. |
private char[] |
password
The password. |
private byte[] |
salt
The salt. |
| Constructor Summary | |
PBEKeySpec(char[] password)
Create a new PBE key spec with just a password. |
|
PBEKeySpec(char[] password,
byte[] salt,
int iterationCount)
Create a PBE key spec with a password, salt, and iteration count. |
|
PBEKeySpec(char[] password,
byte[] salt,
int iterationCount,
int keyLength)
Create a PBE key spec with a password, salt, iteration count, and key length. |
|
| Method Summary | |
void |
clearPassword()
Clear the password array by filling it with null characters. |
int |
getIterationCount()
Get the iteration count, or 0 if it has not been specified. |
int |
getKeyLength()
Get the generated key length, or 0 if it has not been specified. |
char[] |
getPassword()
Get the password character array. |
byte[] |
getSalt()
Get the salt bytes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
iterationCount
private int iterationCount
- The iteration count.
keyLength
private int keyLength
- The generated key length.
password
private char[] password
- The password.
salt
private byte[] salt
- The salt.
| Constructor Detail |
PBEKeySpec
public PBEKeySpec(char[] password)
- Create a new PBE key spec with just a password.
PBEKeySpec
public PBEKeySpec(char[] password,
byte[] salt,
int iterationCount)
- Create a PBE key spec with a password, salt, and iteration count.
PBEKeySpec
public PBEKeySpec(char[] password,
byte[] salt,
int iterationCount,
int keyLength)
- Create a PBE key spec with a password, salt, iteration count, and
key length.
| Method Detail |
clearPassword
public final void clearPassword()
- Clear the password array by filling it with null characters.
getIterationCount
public final int getIterationCount()
- Get the iteration count, or 0 if it has not been specified.
getKeyLength
public final int getKeyLength()
- Get the generated key length, or 0 if it has not been specified.
getPassword
public final char[] getPassword()
- Get the password character array.
getSalt
public final byte[] getSalt()
- Get the salt bytes.
|
|||||||||
| Home >> All >> javax >> crypto >> [ spec overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
javax.crypto.spec.PBEKeySpec