org.mozilla.jss.crypto
public class PBEAlgorithm extends KeyGenAlgorithm
Field Summary | |
---|---|
static PBEAlgorithm | PBE_MD2_DES_CBC |
static PBEAlgorithm | PBE_MD5_DES_CBC |
static PBEAlgorithm | PBE_SHA1_DES3_CBC |
static PBEAlgorithm | PBE_SHA1_DES_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 |
Constructor Summary | |
---|---|
protected | PBEAlgorithm(int oidTag, 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.
|
PBE_MD2_DES_CBC.getEncryptionAlg()
returns
EncryptionAlgorithm.DES_CBC
.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.