| java.lang.Object com.sun.portal.ksecurity.KeyBuilder
KeyBuilder | public class KeyBuilder (Code) | | The KeyBuilder class is used to generate key objects for
use in cryptographic operations. It is a key object factory.
This version of the implementation only supports symmetric keys
and RSA keys with modulus lengths upto and including 1024-bits.
DSA keys are not supported.
See Also: com.sun.portal.ksecurity.Key |
Method Summary | |
public static Key | buildKey(byte kType, short kLen, boolean kEnc) Creates cryptographic keys of the specified type and length.
For now, the third argument is ignored -- it is included here only
for compatibility with the javacard.security.KeyBuilder class.
Note that the object returned by this method must be cast to their
appropriate key type interface. | static String | hexEncode(byte[] b) Converts a byte array into a corresponding string of hexadecimal
digits. |
TYPE_ARCFOUR | final public static byte TYPE_ARCFOUR(Code) | | Indicates an ARCfour key type.
|
TYPE_DES | final public static byte TYPE_DES(Code) | | |
TYPE_RSA_PRIVATE | final public static byte TYPE_RSA_PRIVATE(Code) | | Indicates an RSA private key type.
|
TYPE_RSA_PUBLIC | final public static byte TYPE_RSA_PUBLIC(Code) | | Indicates an RSA public key type.
|
TYPE_TRIPLEDES | final public static byte TYPE_TRIPLEDES(Code) | | |
buildKey | public static Key buildKey(byte kType, short kLen, boolean kEnc) throws CryptoException(Code) | | Creates cryptographic keys of the specified type and length.
For now, the third argument is ignored -- it is included here only
for compatibility with the javacard.security.KeyBuilder class.
Note that the object returned by this method must be cast to their
appropriate key type interface.
Parameters: kType - type of key to be generated Parameters: kLen - the desired size of the key in bits Parameters: kEnc - this parameter is ignored a key with the specified attributes exception: CryptoException - with the NO_SUCH_ALGORITHM reason code ifthe requested key type is not supported. |
hexEncode | static String hexEncode(byte[] b)(Code) | | Converts a byte array into a corresponding string of hexadecimal
digits. This is equivalent to hexEncode(b, 0, b.length).
Parameters: b - byte array to be converted corresponding hexadecimal string |
|
|