edu.vt.middleware.crypt.pbe
Class PKCS12KeyGenerator
java.lang.Object
edu.vt.middleware.crypt.pbe.AbstractPKCSKeyGenerator
edu.vt.middleware.crypt.pbe.PKCS12KeyGenerator
- All Implemented Interfaces:
- KeyGenerator
public class PKCS12KeyGenerator
- extends AbstractPKCSKeyGenerator
Implements the password-based key generation function defined in section B of
PKCS#12.
- Version:
- $Revision: 1818 $
- Author:
- Middleware Services
|
Constructor Summary |
PKCS12KeyGenerator(DigestAlgorithm prf,
byte[] saltBytes,
int iterations)
Creates a new instance that uses the given digest for the pseudorandom
function. |
|
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 |
PKCS12KeyGenerator
public PKCS12KeyGenerator(DigestAlgorithm prf,
byte[] saltBytes,
int iterations)
- Creates a new instance that uses the given digest for the pseudorandom
function.
- Parameters:
prf - Pseudorandom function digest.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.