| Package | Description |
|---|---|
| java.security |
Contains core language classes related to permission management.
|
| java.security.spec | |
| javax.crypto | |
| javax.crypto.spec |
| Modifier and Type | Method and Description |
|---|---|
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 |
EncodedKeySpec
This class represents a public or private key in encoded format.
|
class |
PKCS8EncodedKeySpec
This class represents the ASN.1 encoding of a private key, encoded according to the ASN.1 type
PrivateKeyInfo. |
class |
X509EncodedKeySpec
This class represents the ASN.1 encoding of a public key, encoded according to the ASN.1 type
SubjectPublicKeyInfo. |
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
SecretKeyFactory.generateSecret(KeySpec keySpec)
Generates a
SecretKey object from the provided key specification (key material). |
| Modifier and Type | Class and Description |
|---|---|
class |
PBEKeySpec
A user-chosen password that can be used with password-based encryption (PBE).
|
class |
SecretKeySpec
This class specifies a secret key in a provider-independent fashion.
|