public class ElGamalPrivateKeyImpl extends Object implements ElGamalPrivateKey, DHPrivateKey
| Modifier | Constructor and Description |
|---|---|
protected | ElGamalPrivateKeyImpl()no-arg constructor |
| ElGamalPrivateKeyImpl(BigInteger x,
ElGamalParameterSpec elSpec) |
| ElGamalPrivateKeyImpl(DHPrivateKey key)Create from a DH private key. |
| ElGamalPrivateKeyImpl(DHPrivateKeySpec spec)Create from a DH private key spec. |
| ElGamalPrivateKeyImpl(ElGamalPrivateKey key)Create a copy of the given ElGamal private key. |
| ElGamalPrivateKeyImpl(ElGamalPrivateKeySpec spec)Create from an ElGamal private key spec. |
| ElGamalPrivateKeyImpl(PKCS8EncodedKeySpec spec)Constructor from PKCS8 key spec. |
| Modifier and Type | Method and Description |
|---|---|
String | getAlgorithm() |
byte[] | getEncoded()Return a PKCS8 representation of the key. |
String | getFormat()return the encoding format we produce in getEncoded(). |
ElGamalParameterSpec | getParameters()getParameters(). |
DHParameterSpec | getParams() |
BigInteger | getX() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedprotected ElGamalPrivateKeyImpl()
public ElGamalPrivateKeyImpl(BigInteger x, ElGamalParameterSpec elSpec)
x - the private exponentelSpec - the ElGamal parameterspublic ElGamalPrivateKeyImpl(DHPrivateKey key)
key - the DH private keypublic ElGamalPrivateKeyImpl(DHPrivateKeySpec spec)
spec - the DH private key specpublic ElGamalPrivateKeyImpl(ElGamalPrivateKey key)
key - the keypublic ElGamalPrivateKeyImpl(ElGamalPrivateKeySpec spec)
spec - the ElGamal private key specpublic ElGamalPrivateKeyImpl(PKCS8EncodedKeySpec spec) throws InvalidKeySpecException
spec - the PKCS8 key specInvalidKeySpecException - always, not yet implementedpublic String getAlgorithm()
getAlgorithm in interface Keypublic byte[] getEncoded()
getEncoded in interface Keypublic String getFormat()
public ElGamalParameterSpec getParameters()
ElGamalKeygetParameters in interface ElGamalKeypublic DHParameterSpec getParams()
public BigInteger getX()
getX in interface DHPrivateKeygetX in interface ElGamalPrivateKey