| Package | Description | 
|---|---|
| java.security | Provides the classes and interfaces for the security framework. | 
| java.security.spec | Provides classes and interfaces for key specifications and algorithm
 parameter specifications. | 
| javax.crypto | Provides the classes and interfaces for cryptographic operations. | 
| javax.crypto.spec | Provides classes and interfaces for key specifications and algorithm
parameter specifications. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract <T extends KeySpec> | KeyFactorySpi. engineGetKeySpec(Key key,
                Class<T> keySpec)Returns a specification (key material) of the given key
 object. | 
| <T extends KeySpec> | KeyFactory. getKeySpec(Key key,
          Class<T> keySpec)Returns a specification (key material) of the given key object. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract PrivateKey | KeyFactorySpi. engineGeneratePrivate(KeySpec keySpec)Generates a private key object from the provided key
 specification (key material). | 
| protected abstract PublicKey | KeyFactorySpi. engineGeneratePublic(KeySpec keySpec)Generates a public key object from the provided key
 specification (key material). | 
| PrivateKey | KeyFactory. generatePrivate(KeySpec keySpec)Generates a private key object from the provided key specification
 (key material). | 
| PublicKey | KeyFactory. generatePublic(KeySpec keySpec)Generates a public key object from the provided key specification
 (key material). | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | DSAPrivateKeySpecThis class specifies a DSA private key with its associated parameters. | 
| class  | DSAPublicKeySpecThis class specifies a DSA public key with its associated parameters. | 
| class  | ECPrivateKeySpecThis immutable class specifies an elliptic curve private key with
 its associated parameters. | 
| class  | ECPublicKeySpecThis immutable class specifies an elliptic curve public key with
 its associated parameters. | 
| class  | EncodedKeySpecThis class represents a public or private key in encoded format. | 
| class  | PKCS8EncodedKeySpecThis class represents the ASN.1 encoding of a private key,
 encoded according to the ASN.1 type  PrivateKeyInfo. | 
| class  | RSAMultiPrimePrivateCrtKeySpecThis class specifies an RSA multi-prime private key, as defined in the
 PKCS#1 v2.1, using the Chinese Remainder Theorem (CRT) information
 values for efficiency. | 
| class  | RSAPrivateCrtKeySpecThis class specifies an RSA private key, as defined in the PKCS#1
 standard, using the Chinese Remainder Theorem (CRT) information values for
 efficiency. | 
| class  | RSAPrivateKeySpecThis class specifies an RSA private key. | 
| class  | RSAPublicKeySpecThis class specifies an RSA public key. | 
| class  | X509EncodedKeySpecThis class represents the ASN.1 encoding of a public key,
 encoded according to the ASN.1 type  SubjectPublicKeyInfo. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract KeySpec | SecretKeyFactorySpi. engineGetKeySpec(SecretKey key,
                Class<?> keySpec)Returns a specification (key material) of the given key
 object in the requested format. | 
| KeySpec | SecretKeyFactory. getKeySpec(SecretKey key,
          Class<?> keySpec)Returns a specification (key material) of the given key object
 in the requested format. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract SecretKey | SecretKeyFactorySpi. engineGenerateSecret(KeySpec keySpec)Generates a  SecretKeyobject from the
 provided key specification (key material). | 
| SecretKey | SecretKeyFactory. generateSecret(KeySpec keySpec)Generates a  SecretKeyobject from the provided key
 specification (key material). | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | DESedeKeySpecThis class specifies a DES-EDE ("triple-DES") key. | 
| class  | DESKeySpecThis class specifies a DES key. | 
| class  | DHPrivateKeySpecThis class specifies a Diffie-Hellman private key with its associated
 parameters. | 
| class  | DHPublicKeySpecThis class specifies a Diffie-Hellman public key with its associated
 parameters. | 
| class  | PBEKeySpecA user-chosen password that can be used with password-based encryption
 (PBE). | 
| class  | SecretKeySpecThis class specifies a secret key in a provider-independent fashion. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.