org.mozilla.jss.pkcs11
public final class PK11KeyGenerator extends Object implements KeyGenerator
Method Summary | |
---|---|
SymmetricKey | clone(SymmetricKey key)
Allows a SymmetricKey to be cloned on a different token.
|
static SymmetricKey | clone(SymmetricKey key, PK11Token token)
Allows a SymmetricKey to be cloned on a different token.
|
SymmetricKey | generate()
Generates the key. |
byte[] | generatePBE_IV()
Generates an Initialization Vector using a PBE algorithm.
|
void | initialize(int strength) |
void | initialize(AlgorithmParameterSpec parameters) |
void | sensitiveKeys(boolean sensitive) |
void | setCharToByteConverter(KeyGenerator.CharToByteConverter charToByte)
Sets the character to byte converter for passwords. |
void | setKeyUsages(SymmetricKey.Usage[] usages) |
void | temporaryKeys(boolean temp) |
Throws: SymmetricKey.NotExtractableException If the key material cannot be extracted from the current token. InvalidKeyException If the owning token cannot process the key to be cloned.
Parameters: key The key to clone. token The token on which to clone the key.
Throws: SymmetricKey.NotExtractableException If the key material cannot be extracted from the current token. InvalidKeyException If the owning token cannot process the key to be cloned.
PBEKeyGenParams
.
Returns: The initialization vector derived from the password and salt using the PBE algorithm.
Parameters: strength Key size in bits. Must be evenly divisible by 8.