|
Préférences
Moteurs de recherche
|
||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
java.security
|
Constructor Summary | |
KeyFactorySpi()
|
Method Summary | |
protected abstract PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Generates a private key object from the provided key specification (key material). |
protected abstract PublicKey |
engineGeneratePublic(KeySpec keySpec)
Generates a public key object from the provided key specification (key material). |
protected abstract KeySpec |
engineGetKeySpec(Key key,
Class keySpec)
Returns a specification (key material) of the given key object. |
protected abstract 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyFactorySpi()
Method Detail |
protected abstract PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
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.protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
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.protected abstract 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
DSAPublicKeySpec.class
, to indicate that the
key material should be returned in an instance of the
DSAPublicKeySpec
class.
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).protected abstract Key engineTranslateKey(Key key) throws InvalidKeyException
key
- the key whose provider is unknown or untrusted.
InvalidKeyException
- if the given key cannot be processed
by this key factory.