public class KeyBuilderProxy extends Object
KeyBuilderKeyBuilder| Constructor and Description |
|---|
KeyBuilderProxy() |
| Modifier and Type | Method and Description |
|---|---|
static javacard.security.Key |
buildKey(byte keyType,
short keyLength,
boolean keyEncryption)
Creates uninitialized cryptographic keys for signature and cipher algorithms.
|
public static javacard.security.Key buildKey(byte keyType,
short keyLength,
boolean keyEncryption)
throws javacard.security.CryptoException
Signature, Cipher and KeyPair.
Note that the object returned must be cast to their appropriate key type interface.keyType - the type of key to be generated. Valid codes listed in TYPE.. constants.
See KeyBuilder.TYPE_DES_TRANSIENT_RESET.keyLength - the key size in bits. The valid key bit lengths are key type dependent. Some common
key lengths are listed above above in the LENGTH_.. constants.
See KeyBuilder.LENGTH_DES.keyEncryption - if true this boolean requests a key implementation
which implements the javacardx.crypto.KeyEncryption interface.
The key implementation returned may implement the javacardx.crypto.KeyEncryption
interface even when this parameter is false.javacard.security.CryptoException - with the following reason codes:CryptoException.NO_SUCH_ALGORITHM if the requested algorithm
associated with the specified type, size of key and key encryption interface is not supported.