org.mozilla.jss.pkcs11

Class KeyType

public final class KeyType extends Object

PKCS #11 Key Types These are the possible types for keys in the wrapper library. Key types are implemented as flyweights. Although the KeyType class is public, it should be considered private. We made the KeyType class public so that we can force it to load during CryptoManager.initialize(), before we install JSS as a provider.
Field Summary
static KeyTypeAES
protected static HashtablealgHash
protected Algorithm[]algorithms
static KeyTypeDES
static KeyTypeDES3
static KeyTypeDH
static KeyTypeDSA
static KeyTypeEC
static KeyTypeFORTEZZA
static KeyTypeKEA
protected Stringname
static KeyTypeNULL
static KeyTypeRC2
static KeyTypeRC4
static KeyTypeRSA
static KeyTypeSHA1_HMAC
Constructor Summary
protected KeyType()
protected KeyType(Algorithm[] algs, String name)
Method Summary
static KeyTypegetKeyTypeFromAlgorithm(Algorithm alg)
Returns the KeyType corresponding to the given Algorithm.
Algorithm[]supportedAlgorithms()
Returns an array of algorithms supported by this key type.
StringtoString()

Field Detail

AES

public static final KeyType AES

algHash

protected static Hashtable algHash

algorithms

protected Algorithm[] algorithms

DES

public static final KeyType DES

DES3

public static final KeyType DES3

DH

public static final KeyType DH

DSA

public static final KeyType DSA

EC

public static final KeyType EC

FORTEZZA

public static final KeyType FORTEZZA

Deprecated: As of NSS 3.11, FORTEZZA is no longer supported. This is just a placeholder for backward compatibility.

KEA

public static final KeyType KEA

name

protected String name

NULL

public static final KeyType NULL

RC2

public static final KeyType RC2

RC4

public static final KeyType RC4

RSA

public static final KeyType RSA

SHA1_HMAC

public static final KeyType SHA1_HMAC

Constructor Detail

KeyType

protected KeyType()

KeyType

protected KeyType(Algorithm[] algs, String name)

Method Detail

getKeyTypeFromAlgorithm

public static KeyType getKeyTypeFromAlgorithm(Algorithm alg)
Returns the KeyType corresponding to the given Algorithm. If there is no KeyType registered for this algorithm, a NoSuchAlgorithmException is thrown.

supportedAlgorithms

public Algorithm[] supportedAlgorithms()
Returns an array of algorithms supported by this key type.

toString

public String toString()