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
public class ElGamalPrivateKeyImpl extends Object implements ElGamalPrivateKey, DHPrivateKey
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElGamalPrivateKeyImpl()
ElGamalPrivateKeyImpl(BigInteger x, ElGamalParameterSpec elSpec)
ElGamalPrivateKeyImpl(PKCS8EncodedKeySpec spec)
ElGamalPrivateKeyImpl(DHPrivateKey key)
ElGamalPrivateKeyImpl(DHPrivateKeySpec spec)
ElGamalPrivateKeyImpl(ElGamalPrivateKey key)
ElGamalPrivateKeyImpl(ElGamalPrivateKeySpec spec)
-
Method Summary
Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
Return a PKCS8 representation of the key.String
getFormat()
return the encoding format we produce in getEncoded().ElGamalParameterSpec
getParameters()
DHParameterSpec
getParams()
BigInteger
getX()
-
Constructor Details
-
ElGamalPrivateKeyImpl
protected ElGamalPrivateKeyImpl() -
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
-
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
-