public final class KeyFactory extends KeyFactorySpi
| Constructor and Description |
|---|
KeyFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected PrivateKey | engineGeneratePrivate(KeySpec keySpec)Generates an EdDSA private key from the provided key specification. |
protected PublicKey | engineGeneratePublic(KeySpec keySpec)Generates an EdDSA public key from the provided key specification. |
protected <T extends KeySpec> | engineGetKeySpec(Key key,
Class<T> keySpec)Returns a specification (key material) of the given key object. |
protected Key | engineTranslateKey(Key key)Translates a key object from one provider to another. |
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePrivate in class KeyFactorySpikeySpec - the key specification to convertInvalidKeySpecException - if the key specification is unsupported or malformedprotected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePublic in class KeyFactorySpikeySpec - the key specification to convertInvalidKeySpecException - if the key specification is unsupported or malformedprotected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
engineGetKeySpec in class KeyFactorySpiT - the type of the returned key specificationkey - the keykeySpec - the requested specification classInvalidKeySpecException - if the requested specification type is unsupported
or the key cannot be convertedprotected Key engineTranslateKey(Key key) throws InvalidKeyException
engineTranslateKey in class KeyFactorySpikey - the keyInvalidKeyException - always, as no other EdDSA providers are supported