Class PBESecretKeyFactory
java.lang.Object
javax.crypto.SecretKeyFactorySpi
org.bouncycastle.jcajce.provider.symmetric.util.BaseSecretKeyFactory
org.bouncycastle.jcajce.provider.symmetric.util.PBESecretKeyFactory
- All Implemented Interfaces:
PBE
- Direct Known Subclasses:
AES.PBEWithMD5And128BitAESCBCOpenSSL,AES.PBEWithMD5And192BitAESCBCOpenSSL,AES.PBEWithMD5And256BitAESCBCOpenSSL,AES.PBEWithSHA256And128BitAESBC,AES.PBEWithSHA256And192BitAESBC,AES.PBEWithSHA256And256BitAESBC,AES.PBEWithSHAAnd128BitAESBC,AES.PBEWithSHAAnd192BitAESBC,AES.PBEWithSHAAnd256BitAESBC,ARC4.PBEWithSHAAnd128BitKeyFactory,ARC4.PBEWithSHAAnd40BitKeyFactory,RC2.PBEWithMD5KeyFactory,RC2.PBEWithSHA1KeyFactory,RC2.PBEWithSHAAnd128BitKeyFactory,RC2.PBEWithSHAAnd40BitKeyFactory,SHA1.PBEWithMacKeyFactory,Twofish.PBEWithSHAKeyFactory
public class PBESecretKeyFactory extends BaseSecretKeyFactory implements PBE
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseSecretKeyFactory
algName, algOidFields inherited from interface org.bouncycastle.jcajce.provider.symmetric.util.PBE
MD5, OPENSSL, PKCS12, PKCS5S1, PKCS5S1_UTF8, PKCS5S2, PKCS5S2_UTF8, SHA1, SHA256 -
Constructor Summary
Constructors Constructor Description PBESecretKeyFactory(String algorithm, ASN1ObjectIdentifier oid, boolean forCipher, int scheme, int digest, int keySize, int ivSize) -
Method Summary
Modifier and Type Method Description protected SecretKeyengineGenerateSecret(KeySpec keySpec)Generate a secret key from the specified key specification.Methods inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseSecretKeyFactory
engineGetKeySpec, engineTranslateKey
-
Constructor Details
-
PBESecretKeyFactory
public PBESecretKeyFactory(String algorithm, ASN1ObjectIdentifier oid, boolean forCipher, int scheme, int digest, int keySize, int ivSize)
-
-
Method Details
-
engineGenerateSecret
Description copied from class:SecretKeyFactorySpiGenerate a secret key from the specified key specification.- Overrides:
engineGenerateSecretin classBaseSecretKeyFactory- Parameters:
keySpec- the key specification.- Returns:
- a secret key.
- Throws:
InvalidKeySpecException- if the specified key specification cannot be used to generate a secret key.
-