Package net.i2p.crypto.elgamal.impl
Class ElGamalPublicKeyImpl
- java.lang.Object
-
- net.i2p.crypto.elgamal.impl.ElGamalPublicKeyImpl
-
- All Implemented Interfaces:
Serializable
,Key
,PublicKey
,DHKey
,DHPublicKey
,ElGamalKey
,ElGamalPublicKey
public class ElGamalPublicKeyImpl extends Object implements ElGamalPublicKey, DHPublicKey
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ElGamalPublicKeyImpl(BigInteger y, ElGamalParameterSpec elSpec)
ElGamalPublicKeyImpl(X509EncodedKeySpec spec)
ElGamalPublicKeyImpl(DHPublicKey key)
ElGamalPublicKeyImpl(DHPublicKeySpec spec)
ElGamalPublicKeyImpl(ElGamalPublicKey key)
ElGamalPublicKeyImpl(ElGamalPublicKeySpec spec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
String
getFormat()
ElGamalParameterSpec
getParameters()
DHParameterSpec
getParams()
BigInteger
getY()
(package private) static int
spaceFor(int val)
-
-
-
Constructor Detail
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(ElGamalPublicKeySpec spec)
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(DHPublicKeySpec spec)
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(ElGamalPublicKey key)
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(DHPublicKey key)
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(BigInteger y, ElGamalParameterSpec elSpec)
-
ElGamalPublicKeyImpl
public ElGamalPublicKeyImpl(X509EncodedKeySpec spec)
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in interfaceKey
-
spaceFor
static int spaceFor(int val)
- Parameters:
val
- the length of the value, 65535 max- Returns:
- the length of the TLV
-
getParameters
public ElGamalParameterSpec getParameters()
- Specified by:
getParameters
in interfaceElGamalKey
-
getParams
public DHParameterSpec getParams()
-
getY
public BigInteger getY()
- Specified by:
getY
in interfaceDHPublicKey
- Specified by:
getY
in interfaceElGamalPublicKey
-
-