Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Nested Class Summary
`protected static class` | `KeyGenAlgorithm.FixedKeyStrengthValidator`
`protected static interface` | `KeyGenAlgorithm.KeyStrengthValidator`

Field Summary
`static KeyGenAlgorithm` | `AES`
`static KeyGenAlgorithm` | `DES`
`static KeyGenAlgorithm` | `DES3`
`static KeyGenAlgorithm` | `DESede`
`static KeyGenAlgorithm` | `PBA_SHA1_HMAC`
`static KeyGenAlgorithm` | `RC2`
`static KeyGenAlgorithm` | `RC4`

Fields inherited from class org.mozilla.jss.crypto.Algorithm
`CKM_AES_CBC, CKM_AES_CBC_PAD, CKM_AES_ECB, CKM_AES_KEY_GEN, CKM_DES_CBC_PAD, CKM_DES_KEY_GEN, CKM_DES3_CBC_PAD, CKM_DES3_ECB, CKM_DES3_KEY_GEN, CKM_DSA_KEY_PAIR_GEN, CKM_EC_KEY_PAIR_GEN, CKM_PBA_SHA1_WITH_SHA1_HMAC, CKM_RC2_CBC_PAD, CKM_RC2_KEY_GEN, CKM_RC4_KEY_GEN, CKM_RSA_PKCS_KEY_PAIR_GEN, CKM_SHA_1_HMAC, oid, oidIndex, SEC_OID_ANSIX9_DSA_SIGNATURE, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, SEC_OID_ANSIX962_EC_PUBLIC_KEY, SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE, SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE, SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE, SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE, SEC_OID_DES_CBC, SEC_OID_DES_ECB, SEC_OID_DES_EDE3_CBC, SEC_OID_HMAC_SHA256, SEC_OID_HMAC_SHA384, SEC_OID_HMAC_SHA512, SEC_OID_MD2, SEC_OID_MD5, SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION, SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION, SEC_OID_PKCS1_RSA_ENCRYPTION, SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION, SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION, SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION, SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION, SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC, SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4, SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC, SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC, SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4, SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC, SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC, SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC, SEC_OID_RC2_CBC, SEC_OID_RC4, SEC_OID_SHA1, SEC_OID_SHA256, SEC_OID_SHA384, SEC_OID_SHA512`

Constructor Summary
`protected` | `KeyGenAlgorithm(int oidTag, java.lang.String name, KeyGenAlgorithm.KeyStrengthValidator keyStrengthValidator, OBJECT_IDENTIFIER oid, java.lang.Class paramClass)`

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, getParameterClasses, isValidParameterObject, toOID, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DES

    public static final KeyGenAlgorithm DES

### DES3

    public static final KeyGenAlgorithm DES3

### DESede

    public static final KeyGenAlgorithm DESede

### RC4

    public static final KeyGenAlgorithm RC4

### PBA_SHA1_HMAC

    public static final KeyGenAlgorithm PBA_SHA1_HMAC

### AES

    public static final KeyGenAlgorithm AES

### RC2

    public static final KeyGenAlgorithm RC2

Constructor Detail

### KeyGenAlgorithm

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

Method Detail

### fromOID

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

  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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD