|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.KeyFactorySpi iaik.security.ecc.ecdsa.ECDSAKeyFactory
Implementation of the key factory service provider interface for ECDSA. The following transformations are implemented:
ECPublicKey <--> ECDSAPublicKeySpec, X509EncodedKeySpec ECPrivateKey <--> ECDSAPrivateKeySpec, PKCS8EncodedKeySpecDo not try to get an instance of this class directly, rather use the KeyFactory method
KeyFactory.getInstance("ECDSA")
.
Constructor Summary | |
ECDSAKeyFactory()
Default constructor for the factory. |
Method Summary | |
protected java.security.PrivateKey |
engineGeneratePrivate(java.security.spec.KeySpec keySpec)
Generates a private key from the given key spec. |
protected java.security.PublicKey |
engineGeneratePublic(java.security.spec.KeySpec keySpec)
Generates a public key from the given keySpec |
protected java.security.spec.KeySpec |
engineGetKeySpec(java.security.Key key,
java.lang.Class keySpec)
Implementation of the engine method. |
protected java.security.Key |
engineTranslateKey(java.security.Key key)
Translates the given key object of some unknown or untrusted provider into a key object supported by this ECDSA key factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ECDSAKeyFactory()
KeyFactory.getInstance("ECDSA")
.
Method Detail |
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
keySpec
- the key material; it may either be ECDSAPrivateKeySpec or
PKCS8EncodedKeySpec.
java.security.spec.InvalidKeySpecException
- if the keyspec is not supported or erroneous.protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
keySpec
- the key spec may be a X509EncodedKeySpec or
a ECDSAPublicKeySpec.
java.security.spec.InvalidKeySpecException
- if the key spec can isn't supported or erroneous.protected java.security.spec.KeySpec engineGetKeySpec(java.security.Key key, java.lang.Class keySpec) throws java.security.spec.InvalidKeySpecException
key
- the key to be converted (either ECPublicKey or ECPrivateKey)keySpec
- the key specification type. If the given key is of type ECPublicKey
the keySpec may be ECDSAPublicKeySpec or X509EncodedKeySpec. Otherwise (key is of
type ECPrivateKey) the keySpec may be ECDSAPrivateKeySpec or PKCS8EncodedKeySpec
java.security.spec.InvalidKeySpecException
- if the key can't transformed into the provided keySpec.protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
ECPublicKey
or
ECPrivateKey
.
key
- the key to be translated
java.security.InvalidKeyException
- if the given key cannot be translated
|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |