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