APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.crypto.provider

pack-priv abstract Class PBEKeyFactory

extends SecretKeyFactorySpi
Class Inheritance
Known Direct Subclasses
com.sun.crypto.provider.PBEKeyFactory.PBEWithMD5AndDES, com.sun.crypto.provider.PBEKeyFactory.PBEWithSHA1AndDESede, com.sun.crypto.provider.PBEKeyFactory.PBEWithSHA1AndRC2_40, com.sun.crypto.provider.PBEKeyFactory.PBEWithSHA1AndRC2_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithSHA1AndRC4_40, com.sun.crypto.provider.PBEKeyFactory.PBEWithSHA1AndRC4_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithMD5AndTripleDES, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA1AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA224AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA256AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA384AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512_224AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512_256AndAES_128, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA1AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA224AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA256AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA384AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512_224AndAES_256, com.sun.crypto.provider.PBEKeyFactory.PBEWithHmacSHA512_256AndAES_256
Imports
java.security.InvalidKeyException, java.security.spec.KeySpec, .InvalidKeySpecException, javax.crypto.SecretKey, .SecretKeyFactorySpi, javax.crypto.spec.PBEKeySpec, java.util.HashSet, .Locale, .Set

This class implements a key factory for PBE keys according to PKCS#5, meaning that the password must consist of printable ASCII characters (values 32 to 126 decimal inclusive) and only the low order 8 bits of each password character are used.
Author
Jan Luehe

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final String
private static final HashSet<String>

Constructor Summary

AccessConstructor and Description
private
PBEKeyFactory(String keytype)

Simple constructor

Method Summary

Modifier and TypeMethod and Description
protected SecretKey

Returns:

the secret key
engineGenerateSecret
(KeySpec
the specification (key material) of the secret key
keySpec
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGenerateSecret.

Generates a SecretKey object from the provided key specification (key material).

protected KeySpec

Returns:

the underlying key specification (key material) in the requested format
engineGetKeySpec
(SecretKey
the key
key
,
Class<?>
the requested format in which the key material shall be returned
keySpecCl
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key in the requested format.

protected SecretKey

Returns:

the translated key
engineTranslateKey
(SecretKey
the key whose provider is unknown or untrusted
key
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

Translates a SecretKey object, whose provider may be unknown or potentially untrusted, into a corresponding SecretKey object of this key factory.

Field Detail

typeback to summary
private final String type
validTypesback to summary
private static final HashSet<String> validTypes

Constructor Detail

PBEKeyFactoryback to summary
private PBEKeyFactory(String keytype)

Simple constructor

Method Detail

engineGenerateSecretback to summary
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGenerateSecret.

Generates a SecretKey object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the secret key

Returns:SecretKey

the secret key

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a public key.
engineGetKeySpecback to summary
protected KeySpec engineGetKeySpec(SecretKey key, Class<?> keySpecCl) throws InvalidKeySpecException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key in the requested format.

Parameters
key:SecretKey

the key

keySpecCl:Class<?>

the requested format in which the key material shall be returned

Returns:KeySpec

the underlying key specification (key material) in the requested format

Exceptions
InvalidKeySpecException:
if the requested key specification is inappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).
engineTranslateKeyback to summary
protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

Translates a SecretKey object, whose provider may be unknown or potentially untrusted, into a corresponding SecretKey object of this key factory.

Parameters
key:SecretKey

the key whose provider is unknown or untrusted

Returns:SecretKey

the translated key

Exceptions
InvalidKeyException:
if the given key cannot be processed by this key factory.
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA1AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA1AndAES_128back to summary
public PBEWithHmacSHA1AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA1AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA1AndAES_256back to summary
public PBEWithHmacSHA1AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA224AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA224AndAES_128back to summary
public PBEWithHmacSHA224AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA224AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA224AndAES_256back to summary
public PBEWithHmacSHA224AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA256AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA256AndAES_128back to summary
public PBEWithHmacSHA256AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA256AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA256AndAES_256back to summary
public PBEWithHmacSHA256AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA384AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA384AndAES_128back to summary
public PBEWithHmacSHA384AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA384AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA384AndAES_256back to summary
public PBEWithHmacSHA384AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512_224AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512_224AndAES_128back to summary
public PBEWithHmacSHA512_224AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512_224AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512_224AndAES_256back to summary
public PBEWithHmacSHA512_224AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512_256AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512_256AndAES_128back to summary
public PBEWithHmacSHA512_256AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512_256AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512_256AndAES_256back to summary
public PBEWithHmacSHA512_256AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512AndAES_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512AndAES_128back to summary
public PBEWithHmacSHA512AndAES_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithHmacSHA512AndAES_256

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithHmacSHA512AndAES_256back to summary
public PBEWithHmacSHA512AndAES_256()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithMD5AndDES

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithMD5AndDESback to summary
public PBEWithMD5AndDES()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithMD5AndTripleDES

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithMD5AndTripleDESback to summary
public PBEWithMD5AndTripleDES()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithSHA1AndDESede

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithSHA1AndDESedeback to summary
public PBEWithSHA1AndDESede()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithSHA1AndRC2_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithSHA1AndRC2_128back to summary
public PBEWithSHA1AndRC2_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithSHA1AndRC2_40

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithSHA1AndRC2_40back to summary
public PBEWithSHA1AndRC2_40()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithSHA1AndRC4_128

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithSHA1AndRC4_128back to summary
public PBEWithSHA1AndRC4_128()
com.sun.crypto.provider back to summary

public final Class PBEKeyFactory.PBEWithSHA1AndRC4_40

extends PBEKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.crypto.provider.PBEKeyFactory:
engineGenerateSecretengineGetKeySpecengineTranslateKey

Constructor Detail

PBEWithSHA1AndRC4_40back to summary
public PBEWithSHA1AndRC4_40()