java.lang.Object | |
↳ | java.security.KeyFactory |
KeyFactory
is an engine class that can be used to translate between
public and private key objects and convert keys between their external
representation, that can be easily transported and their internal
representation.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs a new instance of
KeyFactory
with the specified
arguments.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Generates a instance of
PrivateKey
from the given key
specification.
|
||||||||||
|
Generates a instance of
PublicKey
from the given key
specification.
|
||||||||||
|
Returns the name of the algorithm associated with this
KeyFactory
.
|
||||||||||
|
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm from the specified provider.
|
||||||||||
|
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm from the specified provider.
|
||||||||||
|
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm.
|
||||||||||
|
Returns the key specification for the specified key.
|
||||||||||
|
Returns the provider associated with this
KeyFactory
.
|
||||||||||
|
Translates the given key into a key from this key factory.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a new instance of
KeyFactory
with the specified
arguments.
keyFacSpi | the concrete key factory service. |
---|---|
provider | the provider. |
algorithm | the algorithm to use. |
Generates a instance of
PrivateKey
from the given key
specification.
keySpec | the specification of the private key. |
---|
InvalidKeySpecException |
if the specified
keySpec
is invalid.
|
---|
Generates a instance of
PublicKey
from the given key
specification.
keySpec | the specification of the public key |
---|
InvalidKeySpecException |
if the specified
keySpec
is invalid
|
---|
Returns the name of the algorithm associated with this
KeyFactory
.
KeyFactory
.
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm from the specified provider.
algorithm | the name of the algorithm. |
---|---|
provider | the name of the provider. |
KeyFactory
that utilizes the specified
algorithm from the specified provider.
NoSuchAlgorithmException | if the provider does not provide the requested algorithm. |
---|---|
NoSuchProviderException | if the requested provider is not available. |
IllegalArgumentException |
if
provider == null || provider.isEmpty()
|
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm from the specified provider.
algorithm | the name of the algorithm. |
---|---|
provider | the security provider. |
KeyFactory
that utilizes the specified
algorithm from the specified provider.
NoSuchAlgorithmException | if the provider does not provide the requested algorithm. |
---|---|
IllegalArgumentException |
if
provider == null
|
Returns a new instance of
KeyFactory
that utilizes the specified
algorithm.
algorithm | the name of the algorithm. |
---|
KeyFactory
that utilizes the specified
algorithm.
NoSuchAlgorithmException | if no provider provides the requested algorithm. |
---|
Returns the key specification for the specified key.
key | the key from which the specification is requested. |
---|---|
keySpec |
the type of the requested
KeySpec
.
|
InvalidKeySpecException |
if the key can not be processed, or the requested requested
KeySpec
is inappropriate for the given key.
|
---|
Returns the provider associated with this
KeyFactory
.
KeyFactory
.
Translates the given key into a key from this key factory.
key | the key to translate. |
---|
InvalidKeyException | if the specified key can not be translated by this key factory. |
---|