public class LunaKeyFactoryEC extends LunaKeyFactory
Instances of this class should only be created using
KeyFactory.getInstance
Constructor and Description |
---|
LunaKeyFactoryEC() |
Modifier and Type | Method and Description |
---|---|
protected java.security.Key |
createLunaKey(java.security.PublicKey key) |
protected java.security.PrivateKey |
engineGeneratePrivate(java.security.spec.KeySpec spec)
Creates a private key on the HSM from the given key spec.
|
protected java.security.PublicKey |
engineGeneratePublic(java.security.spec.KeySpec spec)
Creates a public key on the HSM from the given key spec.
|
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.
|
decodeX509, engineGetKeySpec
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec spec) throws java.security.spec.InvalidKeySpecException
MakePersistent
method to make it permanent.engineGeneratePublic
in class java.security.KeyFactorySpi
spec
- The specification of the public key to create. This must be an instance of ECPublicKeySpec or
X509EncodedKeySpecjava.security.spec.InvalidKeySpecException
- If the key spec is of any type other than ECPublicKeySpec or X509EncodedKeySpec, or if the given spec is
badly encodedprotected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec spec) throws java.security.spec.InvalidKeySpecException
MakePersistent
method make it permanent.engineGeneratePrivate
in class java.security.KeyFactorySpi
spec
- The specification of the private key to create. This must be an instance of PKCS8EncodedKeySpecjava.security.spec.InvalidKeySpecException
- If the key spec is of any type other than PKCS8EncodedKeySpec, or if the given spec is badly encodedprotected java.security.Key createLunaKey(java.security.PublicKey key)
createLunaKey
in class LunaKeyFactory
protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
LunaKeyFactory
MakePersistent
method to make it permanent.engineTranslateKey
in class LunaKeyFactory
key
- The incoming key to translate into a Luna keyjava.security.InvalidKeyException
- If the incoming key is not an instance of PublicKey or PrivateKeyCopyright 2014-2018 SafeNet. All rights reserved.