Package net.i2p.crypto.elgamal.impl
Class ElGamalPrivateKeyImpl
java.lang.Object
net.i2p.crypto.elgamal.impl.ElGamalPrivateKeyImpl
- All Implemented Interfaces:
Serializable
,Key
,PrivateKey
,DHKey
,DHPrivateKey
,Destroyable
,ElGamalKey
,ElGamalPrivateKey
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
ElGamalPrivateKeyImpl
(BigInteger x, ElGamalParameterSpec elSpec) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Return a PKCS8 representation of the key.return the encoding format we produce in getEncoded().getX()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
ElGamalPrivateKeyImpl
protected ElGamalPrivateKeyImpl() -
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
- Throws:
InvalidKeySpecException
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceKey
-
getFormat
return the encoding format we produce in getEncoded(). -
getEncoded
public byte[] getEncoded()Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncoded
in interfaceKey
- Returns:
- a PKCS8 representation of the key.
-
getParameters
- Specified by:
getParameters
in interfaceElGamalKey
-
getParams
-
getX
- Specified by:
getX
in interfaceDHPrivateKey
- Specified by:
getX
in interfaceElGamalPrivateKey
-