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
Get Java Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.