public class BaseSecretKeyFactory extends SecretKeyFactorySpi implements PBE
| Modifier and Type | Field and Description |
|---|---|
protected String |
algName |
protected ASN1ObjectIdentifier |
algOid |
MD5, OPENSSL, PKCS12, PKCS5S1, PKCS5S1_UTF8, PKCS5S2, PKCS5S2_UTF8, SHA1, SHA256| Modifier | Constructor and Description |
|---|---|
protected |
BaseSecretKeyFactory(String algName,
ASN1ObjectIdentifier algOid) |
| Modifier and Type | Method and Description |
|---|---|
protected SecretKey |
engineGenerateSecret(KeySpec keySpec)
Generate a secret key from the specified key specification.
|
protected KeySpec |
engineGetKeySpec(SecretKey key,
Class keySpec)
Returns the key specification of the specified secret key.
|
protected SecretKey |
engineTranslateKey(SecretKey key)
Translates the specified secret key into an instance of the corresponding
key from the provider of this key factory.
|
protected String algName
protected ASN1ObjectIdentifier algOid
protected BaseSecretKeyFactory(String algName, ASN1ObjectIdentifier algOid)
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException
SecretKeyFactorySpiengineGenerateSecret in class SecretKeyFactorySpikeySpec - the key specification.InvalidKeySpecException - if the specified key specification cannot be used to generate
a secret key.protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException
SecretKeyFactorySpiengineGetKeySpec in class SecretKeyFactorySpikey - the secret key to get the specification from.keySpec - the target key specification class.InvalidKeySpecException - if the specified secret key cannot be transformed into the
requested key specification.protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException
SecretKeyFactorySpiengineTranslateKey in class SecretKeyFactorySpikey - the secret key to translate.InvalidKeyException - if the specified key cannot be translated using this key
factory.