edu.vt.middleware.crypt.pbe
Class PBKDF2KeyGenerator
java.lang.Object
edu.vt.middleware.crypt.pbe.AbstractPKCSKeyGenerator
edu.vt.middleware.crypt.pbe.PBKDF2KeyGenerator
- All Implemented Interfaces:
- KeyGenerator
public class PBKDF2KeyGenerator
- extends AbstractPKCSKeyGenerator
Implements the PBKDF2 key generation function defined in PKCS#5v2.
- Version:
- $Revision: 1818 $
- Author:
- Middleware Services
|
Constructor Summary |
PBKDF2KeyGenerator(byte[] saltBytes)
Creates a new instance that uses SHA1 hash for pseudorandom function to
generate derived keys. |
PBKDF2KeyGenerator(byte[] saltBytes,
int iterations)
Creates a new instance that uses SHA1 hash for pseudorandom function to
generate derived keys. |
|
Method Summary |
protected org.bouncycastle.crypto.PBEParametersGenerator |
newParamGenerator()
Creates a new BC parameter generator instance. |
protected byte[] |
toBytes(char[] password)
Converts password characters to bytes in implementation-dependent fashion. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PBKDF2KeyGenerator
public PBKDF2KeyGenerator(byte[] saltBytes)
- Creates a new instance that uses SHA1 hash for pseudorandom function to
generate derived keys.
- Parameters:
saltBytes - Key derivation function salt bytes.
PBKDF2KeyGenerator
public PBKDF2KeyGenerator(byte[] saltBytes,
int iterations)
- Creates a new instance that uses SHA1 hash for pseudorandom function to
generate derived keys.
- Parameters:
saltBytes - Key derivation function salt bytes.iterations - Key derivation function iteration count.
newParamGenerator
protected org.bouncycastle.crypto.PBEParametersGenerator newParamGenerator()
- Creates a new BC parameter generator instance.
- Specified by:
newParamGenerator in class AbstractPKCSKeyGenerator
- Returns:
- New parameter generator.
toBytes
protected byte[] toBytes(char[] password)
- Converts password characters to bytes in implementation-dependent fashion.
- Specified by:
toBytes in class AbstractPKCSKeyGenerator
- Parameters:
password - Password to convert.
- Returns:
- Password bytes.
Copyright © 2003-2011 Virginia Tech. All Rights Reserved.