|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.KeyFactorySpi de.cscc.crypto.provider.RSAKeyFactoryEngine
RSAKeyFactoryEngine Class.
Constructor Summary | |
RSAKeyFactoryEngine()
Creates new RSAKeyFactoryEngine |
Method Summary | |
PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Generates a private key object from the provided key specification (key material). |
PublicKey |
engineGeneratePublic(KeySpec keySpec)
Generates a public key object from the provided key specification (key material). |
KeySpec |
engineGetKeySpec(Key key,
Class keySpec)
Returns a specification (key material) of the given key object. |
Key |
engineTranslateKey(Key key)
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RSAKeyFactoryEngine()
Method Detail |
public String toString()
public PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
The following KeySpecs will produce the following instances of its matching keys:
keySpec
- the specification (key material) of the private key.
InvalidKeySpecException
- if the given key specification
is inappropriate for this key factory to produce a private key.
NullPointerException
- If keySpec
or one of the key
data in keySpec
is null
. So you have to
construct a valid keySpec without null
fields.BigInteger
public PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
The following KeySpecs will produce the following instances of its matching keys:
keySpec
- the specification (key material) of the public key.
InvalidKeySpecException
- if the given key specification
is inappropriate for this key factory to produce a public key.
NullPointerException
- If keySpec
or one of the key
data in keySpec
is null
. So you have to
construct a valid keySpec without null
fields.
IllegalArgumentException
- if any key material from keySpec is
negative.public KeySpec engineGetKeySpec(Key key, Class keySpec) throws InvalidKeySpecException
keySpec
identifies the specification class in which
the key material should be returned. It could, for example, be
RSAPublicKeySpec.class
, to indicate that the
key material should be returned in an instance of the
RSAPublicKeySpec
class.
The following conversions are valid for this provider:
key
- the key.keySpec
- the specification class in which
the key material should be returned.
InvalidKeySpecException
- if the requested key specification is
inappropriate for the given key, or the given key cannot be dealt with
(e.g., the given key has an unrecognized format).
NullPointerException
- If one of the params or one of the needed
key data in the key
is null
. So you have to
produce a valid key without null
fields with your
KeyPairGenerator. This should not be a problem with keys from this
provider, but maybe with keys from other providers.
IllegalArgumentException
- if any key material in the key
key
is negative. This should not be a problem with keys
from this provider, but maybe with keys from other providers.public Key engineTranslateKey(Key key) throws InvalidKeyException
The following translations are valid for this provider:
key
- the key whose provider is unknown or untrusted.
InvalidKeyException
- if the given key cannot be processed
by this key factory.
NullPointerException
- If the key
it self or one of
the key data in the key
is null
. So you have to
produce a valid key without null
fields with your
KeyPairGenerator. This should not be a problem with this provider, but
maybe with other providers.
IllegalArgumentException
- if any key material in the key
key
is negative. This should not be a problem with keys
from this provider, but maybe with keys from other providers.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |