public abstract class LunaKeyFactory extends KeyFactorySpi
| Constructor and Description |
|---|
LunaKeyFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Key |
createLunaKey(PublicKey key) |
protected LunaKey |
decodeX509(X509EncodedKeySpec spec) |
protected <T extends KeySpec> |
engineGetKeySpec(Key key,
Class<T> specType)
Gets a key spec of the specified class for the given key.
|
protected Key |
engineTranslateKey(Key key)
Extracts the specifications of the given public key or private key
and returns an instance of LunaPublicKey or LunaPrivateKey.
|
engineGeneratePrivate, engineGeneratePublicprotected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> specType) throws InvalidKeySpecException
engineGetKeySpec in class KeyFactorySpikey - The key to get the spec forspecType - A class object representing the type of key spec requested.
This must be X509EncodedKeySpecInvalidKeySpecException - If the key class is anything than
a subclass of LunaPublicKey, or if the key spec is anything other
than X509EncodedKeySpecprotected Key engineTranslateKey(Key key) throws InvalidKeyException
MakePersistent method
to make it permanent.engineTranslateKey in class KeyFactorySpikey - The incoming key to translate into a Luna keyInvalidKeyException - If the incoming key is not an instance
of PublicKey or PrivateKeyprotected LunaKey decodeX509(X509EncodedKeySpec spec) throws InvalidKeySpecException
InvalidKeySpecExceptionCopyright 2014-2016 SafeNet Inc