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

## org.mozilla.jss.crypto
Class PBEAlgorithm

    java.lang.Object
      |
      +--org.mozilla.jss.crypto.Algorithm
            |
            +--org.mozilla.jss.crypto.KeyGenAlgorithm
                  |
                  +--org.mozilla.jss.crypto.PBEAlgorithm

public class PBEAlgorithm
extends KeyGenAlgorithm

Algorithms that can be used for generating symmetric keys from passwords.

Field Summary
`private EncryptionAlgorithm` | `encAlg`
`static PBEAlgorithm` | `PBE_MD2_DES_CBC`
`static PBEAlgorithm` | `PBE_MD5_DES_CBC`
`static PBEAlgorithm` | `PBE_SHA1_DES_CBC`
`static PBEAlgorithm` | `PBE_SHA1_DES3_CBC`
`static PBEAlgorithm` | `PBE_SHA1_RC2_128_CBC`
`static PBEAlgorithm` | `PBE_SHA1_RC2_40_CBC`
`static PBEAlgorithm` | `PBE_SHA1_RC4_128`
`static PBEAlgorithm` | `PBE_SHA1_RC4_40`
`private static OBJECT_IDENTIFIER` | `PKCS12_PBE`
`private static OBJECT_IDENTIFIER` | `PKCS5`
`private int` | `saltLength`

Fields inherited from class org.mozilla.jss.crypto.KeyGenAlgorithm
`DES, DES3, oidMap, PBA_SHA1_HMAC, RC4, validStrength`

Fields inherited from class org.mozilla.jss.crypto.Algorithm
`ANSI_X9_ALGORITHM, 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_PBA_SHA1_WITH_SHA1_HMAC, CKM_RC4_KEY_GEN, CKM_RSA_PKCS_KEY_PAIR_GEN, CKM_SHA_1_HMAC, name, oid, oidIndex, parameterClass, SEC_OID_ANSIX9_DSA_SIGNATURE, SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, SEC_OID_DES_CBC, SEC_OID_DES_ECB, SEC_OID_DES_EDE3_CBC, 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_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`

Constructor Summary
`protected` | `PBEAlgorithm(int oidTag, java.lang.String name, int validStrength, OBJECT_IDENTIFIER oid, EncryptionAlgorithm encAlg, int saltLength)`

Method Summary
`EncryptionAlgorithm` | `getEncryptionAlg()` Returns the EncryptionAlgorithm that should be used with keys generated with this PBEAlgorithm.
`int` | `getSaltLength()` Returns the number of bytes of salt that should be supplied when generating keys with this algorithm.

Methods inherited from class org.mozilla.jss.crypto.KeyGenAlgorithm
`fromOID, isValidStrength`

Methods inherited from class org.mozilla.jss.crypto.Algorithm
`getParameterClass, toOID, toString`

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

Field Detail

### encAlg

    private EncryptionAlgorithm encAlg

### saltLength

    private int saltLength

### PKCS5

    private static final OBJECT_IDENTIFIER PKCS5

### PKCS12_PBE

    private static final OBJECT_IDENTIFIER PKCS12_PBE

### PBE_MD2_DES_CBC

    public static final PBEAlgorithm PBE_MD2_DES_CBC

### PBE_MD5_DES_CBC

    public static final PBEAlgorithm PBE_MD5_DES_CBC

### PBE_SHA1_DES_CBC

    public static final PBEAlgorithm PBE_SHA1_DES_CBC

### PBE_SHA1_RC4_128

    public static final PBEAlgorithm PBE_SHA1_RC4_128

### PBE_SHA1_RC4_40

    public static final PBEAlgorithm PBE_SHA1_RC4_40

### PBE_SHA1_DES3_CBC

    public static final PBEAlgorithm PBE_SHA1_DES3_CBC

### PBE_SHA1_RC2_128_CBC

    public static final PBEAlgorithm PBE_SHA1_RC2_128_CBC

### PBE_SHA1_RC2_40_CBC

    public static final PBEAlgorithm PBE_SHA1_RC2_40_CBC

Constructor Detail

### PBEAlgorithm

    protected PBEAlgorithm(int oidTag,
                           java.lang.String name,
                           int validStrength,
                           OBJECT_IDENTIFIER oid,
                           EncryptionAlgorithm encAlg,
                           int saltLength)

Method Detail

### getEncryptionAlg

    public EncryptionAlgorithm getEncryptionAlg()

  Returns the EncryptionAlgorithm that should be used with keys generated with this PBEAlgorithm. For example, `PBE_MD2_DES_CBC.getEncryptionAlg()` returns `EncryptionAlgorithm.DES_CBC`.

### getSaltLength

    public int getSaltLength()

  Returns the number of bytes of salt that should be supplied when generating keys with this algorithm.

  PKCS #5 algorithms require exactly 8 bytes of salt. PKCS #12 algorithms take a variable length, but recommend that the salt length be at least as long as the output of the hash function. For SHA-1, the output length is 20 bytes.

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