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 protectedElGamalPrivateKeyImpl()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 StringgetAlgorithm()byte[]getEncoded()Return a PKCS8 representation of the key.StringgetFormat()return the encoding format we produce in getEncoded().ElGamalParameterSpecgetParameters()DHParameterSpecgetParams()BigIntegergetX()
-
Constructor Details
-
ElGamalPrivateKeyImpl
protected ElGamalPrivateKeyImpl() -
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
ElGamalPrivateKeyImpl
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin 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:
getEncodedin interfaceKey- Returns:
- a PKCS8 representation of the key.
-
getParameters
- Specified by:
getParametersin interfaceElGamalKey
-
getParams
-
getX
- Specified by:
getXin interfaceDHPrivateKey- Specified by:
getXin interfaceElGamalPrivateKey
-