org.mozilla.jss.crypto

Class KeyGenAlgorithm

public class KeyGenAlgorithm extends Algorithm

Algorithms that can be used for generating symmetric keys.
Nested Class Summary
protected static classKeyGenAlgorithm.FixedKeyStrengthValidator
protected static interfaceKeyGenAlgorithm.KeyStrengthValidator
Field Summary
static KeyGenAlgorithmAES
static KeyGenAlgorithmDES
static KeyGenAlgorithmDES3
static KeyGenAlgorithmDESede
static KeyGenAlgorithmPBA_SHA1_HMAC
static KeyGenAlgorithmRC2
static KeyGenAlgorithmRC4
Constructor Summary
protected KeyGenAlgorithm(int oidTag, String name, KeyGenAlgorithm.KeyStrengthValidator keyStrengthValidator, OBJECT_IDENTIFIER oid, Class paramClass)
Method Summary
static KeyGenAlgorithmfromOID(OBJECT_IDENTIFIER oid)
booleanisValidStrength(int strength)
Returns true if the given strength is valid for this key generation algorithm.

Field Detail

AES

public static final KeyGenAlgorithm AES

DES

public static final KeyGenAlgorithm DES

DES3

public static final KeyGenAlgorithm DES3

DESede

public static final KeyGenAlgorithm DESede

PBA_SHA1_HMAC

public static final KeyGenAlgorithm PBA_SHA1_HMAC

RC2

public static final KeyGenAlgorithm RC2

RC4

public static final KeyGenAlgorithm RC4

Constructor Detail

KeyGenAlgorithm

protected KeyGenAlgorithm(int oidTag, String name, KeyGenAlgorithm.KeyStrengthValidator keyStrengthValidator, OBJECT_IDENTIFIER oid, Class paramClass)

Method Detail

fromOID

public static KeyGenAlgorithm fromOID(OBJECT_IDENTIFIER oid)

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.