Package org.mozilla.jss.pkcs11
Class KeyType
- java.lang.Object
-
- org.mozilla.jss.pkcs11.KeyType
-
public final class KeyType extends java.lang.ObjectPKCS #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
Fields Modifier and Type Field Description static KeyTypeAESprotected static java.util.Hashtable<Algorithm,KeyType>algHashprotected Algorithm[]algorithmsstatic KeyTypeDESstatic KeyTypeDES3static KeyTypeDHstatic KeyTypeDSAstatic KeyTypeECstatic KeyTypeFORTEZZADeprecated.As of NSS 3.11, FORTEZZA is no longer supported.static KeyTypeGENERIC_SECRETstatic KeyTypeKEAprotected java.lang.Stringnamestatic KeyTypeNULLstatic KeyTypeRC2static KeyTypeRC4static KeyTypeRSAstatic KeyTypeSHA1_HMAC
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyTypegetKeyTypeFromAlgorithm(Algorithm alg)Returns the KeyType corresponding to the given Algorithm.Algorithm[]supportedAlgorithms()Returns an array of algorithms supported by this key type.java.lang.StringtoString()
-
-
-
Field Detail
-
algorithms
protected Algorithm[] algorithms
-
name
protected java.lang.String name
-
NULL
public static final KeyType NULL
-
RSA
public static final KeyType RSA
-
DSA
public static final KeyType DSA
-
EC
public static final KeyType EC
-
FORTEZZA
@Deprecated public static final KeyType FORTEZZA
Deprecated.As of NSS 3.11, FORTEZZA is no longer supported. This is just a placeholder for backward compatibility.
-
DH
public static final KeyType DH
-
KEA
public static final KeyType KEA
-
DES
public static final KeyType DES
-
DES3
public static final KeyType DES3
-
AES
public static final KeyType AES
-
RC4
public static final KeyType RC4
-
RC2
public static final KeyType RC2
-
SHA1_HMAC
public static final KeyType SHA1_HMAC
-
GENERIC_SECRET
public static final KeyType GENERIC_SECRET
-
-
Constructor Detail
-
KeyType
protected KeyType()
-
KeyType
protected KeyType(Algorithm[] algs, java.lang.String name)
-
-
Method Detail
-
supportedAlgorithms
public Algorithm[] supportedAlgorithms()
Returns an array of algorithms supported by this key type.
-
getKeyTypeFromAlgorithm
public static KeyType getKeyTypeFromAlgorithm(Algorithm alg) throws java.security.NoSuchAlgorithmException
Returns the KeyType corresponding to the given Algorithm. If there is no KeyType registered for this algorithm, a NoSuchAlgorithmException is thrown.- Throws:
java.security.NoSuchAlgorithmException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-