public class LunaKeyFactoryDH extends LunaKeyFactory
| Constructor and Description |
|---|
LunaKeyFactoryDH() |
| Modifier and Type | Method and Description |
|---|---|
protected Key |
createLunaKey(PublicKey key) |
protected PrivateKey |
engineGeneratePrivate(KeySpec spec)
Creates a private key on the HSM from the given key spec.
|
protected PublicKey |
engineGeneratePublic(KeySpec spec)
Creates a public key on the HSM from the given key spec.
|
protected Key |
engineTranslateKey(Key key)
Extracts the specifications of the given public key or private key
and returns an instance of LunaPublicKey or LunaPrivateKey.
|
decodeX509, engineGetKeySpecprotected PublicKey engineGeneratePublic(KeySpec spec) throws InvalidKeySpecException
MakePersistent method
to make it permanent.engineGeneratePublic in class KeyFactorySpispec - The specification of the public key to create. This must be
an instance of DHPublicKeySpec or X509EncodedKeySpecInvalidKeySpecException - If the key spec is of any type other
than DHPublicKeySpec or X509EncodedKeySpec, or if the given spec
is badly encodedprotected PrivateKey engineGeneratePrivate(KeySpec spec) throws InvalidKeySpecException
MakePersistent method
make it permanent.engineGeneratePrivate in class KeyFactorySpispec - The specification of the private key to create. This must
be an instance of PKCS8EncodedKeySpecInvalidKeySpecException - If the key spec is of any type other
than PKCS8EncodedKeySpec, or if the given spec is badly encodedprotected Key createLunaKey(PublicKey key)
createLunaKey in class LunaKeyFactoryprotected Key engineTranslateKey(Key key) throws InvalidKeyException
LunaKeyFactoryMakePersistent method
to make it permanent.engineTranslateKey in class LunaKeyFactorykey - The incoming key to translate into a Luna keyInvalidKeyException - If the incoming key is not an instance
of PublicKey or PrivateKeyCopyright 2014-2016 SafeNet Inc