O'Reilly logo

Java Security by Scott Oaks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Class javax.crypto.SecretKeyFactory

Synopsis

A secret key factory is used to convert between secret key data formats; like a key factory, this is typically used to import a key based on its external format or to export a key to its encoded format or algorithm parameters. Instances of this class are obtained by calling the getInstance() method. Keys may be exported by using the translateKey() method; they are imported by using the generate Secret() method.

Class Definition

public class javax.crypto.SecretKeyFactory
	extends java.lang.Object {

	// Constructors
	protected SecretKeyFactory(SecretKeyFactorySpi, Provider);

	// Class Methods
	public static final SecretKeyFactory getInstance(String);
	public static final SecretKeyFactory getInstance(String, String);

	// Instance Methods
	public final SecretKey generateSecret(KeySpec);
	public final KeySpec getKeySpec(SecretKey, Class);
	public final Provider getProvider();
	public final SecretKey translateKey(SecretKey);
}

See also:

KeySpec, Provider, SecretKey, SecretKeyFactorySpi

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required