Package org.bouncycastle.bcpg
Class DSAPublicBCPGKey
- java.lang.Object
-
- org.bouncycastle.bcpg.BCPGObject
-
- org.bouncycastle.bcpg.DSAPublicBCPGKey
-
- All Implemented Interfaces:
BCPGKey,org.bouncycastle.util.Encodable
public class DSAPublicBCPGKey extends BCPGObject implements BCPGKey
base class for a DSA Public Key.
-
-
Constructor Summary
Constructors Constructor Description DSAPublicBCPGKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger y)DSAPublicBCPGKey(BCPGInputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(BCPGOutputStream out)byte[]getEncoded()return the standard PGP encoding of the key.java.lang.StringgetFormat()return "PGP"java.math.BigIntegergetG()java.math.BigIntegergetP()java.math.BigIntegergetQ()java.math.BigIntegergetY()
-
-
-
Constructor Detail
-
DSAPublicBCPGKey
public DSAPublicBCPGKey(BCPGInputStream in) throws java.io.IOException
- Parameters:
in- the stream to read the packet from.- Throws:
java.io.IOException
-
DSAPublicBCPGKey
public DSAPublicBCPGKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger y)
-
-
Method Detail
-
getFormat
public java.lang.String getFormat()
return "PGP"- Specified by:
getFormatin interfaceBCPGKey- Returns:
- "RAW" or "PGP"
- See Also:
BCPGKey.getFormat()
-
getEncoded
public byte[] getEncoded()
return the standard PGP encoding of the key.- Specified by:
getEncodedin interfaceBCPGKey- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Overrides:
getEncodedin classBCPGObject- Returns:
- byte[]
- See Also:
BCPGKey.getEncoded()
-
encode
public void encode(BCPGOutputStream out) throws java.io.IOException
- Specified by:
encodein classBCPGObject- Throws:
java.io.IOException
-
getG
public java.math.BigInteger getG()
- Returns:
- g
-
getP
public java.math.BigInteger getP()
- Returns:
- p
-
getQ
public java.math.BigInteger getQ()
- Returns:
- q
-
getY
public java.math.BigInteger getY()
- Returns:
- g
-
-