Skip to Content
Java Security
book

Java Security

by Scott Oaks
May 1998
Intermediate to advanced
469 pages
14h 57m
English
O'Reilly Media, Inc.
Content preview from Java Security

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Security Handbook

Java Security Handbook

Jamie Jaworski, Paul J. Perrone, Venkata S.R. Krishna Chaganti

Publisher Resources

ISBN: 1565924037Supplemental ContentCatalog PageErrata