org.mozilla.jss.crypto
Class KeyGenAlgorithm

java.lang.Object
  |
  +--org.mozilla.jss.crypto.Algorithm
        |
        +--org.mozilla.jss.crypto.KeyGenAlgorithm
Direct Known Subclasses:
PBEAlgorithm

public class KeyGenAlgorithm
extends Algorithm

Algorithms that can be used for generating symmetric keys.


Field Summary
static KeyGenAlgorithm DES
           
static KeyGenAlgorithm DES3
           
static KeyGenAlgorithm PBA_SHA1_HMAC
           
static KeyGenAlgorithm RC4
           
 
Method Summary
static KeyGenAlgorithm fromOID(OBJECT_IDENTIFIER oid)
           
 boolean isValidStrength(int strength)
          Returns true if the given strength is valid for this key generation algorithm.
 
Methods inherited from class org.mozilla.jss.crypto.Algorithm
getParameterClass, toOID, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DES

public static final KeyGenAlgorithm DES

DES3

public static final KeyGenAlgorithm DES3

RC4

public static final KeyGenAlgorithm RC4

PBA_SHA1_HMAC

public static final KeyGenAlgorithm PBA_SHA1_HMAC
Method Detail

fromOID

public static KeyGenAlgorithm fromOID(OBJECT_IDENTIFIER oid)
                               throws java.security.NoSuchAlgorithmException

isValidStrength

public boolean isValidStrength(int strength)
Returns true if the given strength is valid for this key generation algorithm. Note that PBE algorithms require PBEParameterSpecs rather than strengths. It is the responsibility of the caller to verify this.