diff options
Diffstat (limited to 'libraries/spongycastle/pg/src/main/java/org/spongycastle/bcpg/ElGamalSecretBCPGKey.java')
-rw-r--r-- | libraries/spongycastle/pg/src/main/java/org/spongycastle/bcpg/ElGamalSecretBCPGKey.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/libraries/spongycastle/pg/src/main/java/org/spongycastle/bcpg/ElGamalSecretBCPGKey.java b/libraries/spongycastle/pg/src/main/java/org/spongycastle/bcpg/ElGamalSecretBCPGKey.java deleted file mode 100644 index 9a7d2b02b..000000000 --- a/libraries/spongycastle/pg/src/main/java/org/spongycastle/bcpg/ElGamalSecretBCPGKey.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.spongycastle.bcpg; - -import java.io.*; -import java.math.BigInteger; - -/** - * base class for an ElGamal Secret Key. - */ -public class ElGamalSecretBCPGKey - extends BCPGObject implements BCPGKey -{ - MPInteger x; - - /** - * - * @param in - * @throws IOException - */ - public ElGamalSecretBCPGKey( - BCPGInputStream in) - throws IOException - { - this.x = new MPInteger(in); - } - - /** - * - * @param x - */ - public ElGamalSecretBCPGKey( - BigInteger x) - { - this.x = new MPInteger(x); - } - - /** - * return "PGP" - * - * @see org.spongycastle.bcpg.BCPGKey#getFormat() - */ - public String getFormat() - { - return "PGP"; - } - - public BigInteger getX() - { - return x.getValue(); - } - - /** - * return the standard PGP encoding of the key. - * - * @see org.spongycastle.bcpg.BCPGKey#getEncoded() - */ - public byte[] getEncoded() - { - try - { - ByteArrayOutputStream bOut = new ByteArrayOutputStream(); - BCPGOutputStream pgpOut = new BCPGOutputStream(bOut); - - pgpOut.writeObject(this); - - return bOut.toByteArray(); - } - catch (IOException e) - { - return null; - } - } - - public void encode( - BCPGOutputStream out) - throws IOException - { - out.writeObject(x); - } -} |