|
JSS 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
KeyGenerator
)
Generates symmetric keys for encryption and decryption.
Nested Class Summary | |
static interface |
KeyGenerator.CharToByteConverter
Deprecated. An interface for converting a password of Java characters into an array of bytes. |
Method Summary | |
SymmetricKey |
clone(SymmetricKey key)
Deprecated. Allows a SymmetricKey to be cloned on a different token. |
SymmetricKey |
generate()
Deprecated. |
byte[] |
generatePBE_IV()
Deprecated. Generates an Initialization Vector using a PBE algorithm. |
void |
initialize(java.security.spec.AlgorithmParameterSpec parameters)
Deprecated. |
void |
initialize(int strength)
Deprecated. |
void |
setCharToByteConverter(KeyGenerator.CharToByteConverter charToByte)
Deprecated. Sets the character to byte converter for passwords. |
Method Detail |
public void initialize(int strength) throws java.security.InvalidAlgorithmParameterException
strength
- Key size in bits. Must be evenly divisible by 8.
java.security.InvalidAlgorithmParameterException
public void initialize(java.security.spec.AlgorithmParameterSpec parameters) throws java.security.InvalidAlgorithmParameterException
java.security.InvalidAlgorithmParameterException
public SymmetricKey generate() throws java.lang.IllegalStateException, TokenException, java.io.CharConversionException
java.lang.IllegalStateException
TokenException
java.io.CharConversionException
public byte[] generatePBE_IV() throws java.lang.IllegalStateException, TokenException, java.io.CharConversionException
PBEKeyGenParams
.
java.lang.IllegalStateException
- If the algorithm is not a PBE
algorithm, or the KeyGenerator has not been initialized with
an instance of PBEKeyGenParams
.
TokenException
- If an error occurs on the CryptoToken while
generating the IV.
java.io.CharConversionException
public SymmetricKey clone(SymmetricKey key) throws SymmetricKey.NotExtractableException, java.security.InvalidKeyException, TokenException
SymmetricKey.NotExtractableException
- If the key material
cannot be extracted from the current token.
java.security.InvalidKeyException
- If the owning token cannot process
the key to be cloned.
TokenException
public void setCharToByteConverter(KeyGenerator.CharToByteConverter charToByte)
|
JSS 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |