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(BigInteger p, BigInteger q, BigInteger g, BigInteger y)
DSAPublicBCPGKey(BCPGInputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(BCPGOutputStream out)
byte[]
getEncoded()
return the standard PGP encoding of the key.String
getFormat()
return "PGP"BigInteger
getG()
BigInteger
getP()
BigInteger
getQ()
BigInteger
getY()
-
-
-
Constructor Detail
-
DSAPublicBCPGKey
public DSAPublicBCPGKey(BCPGInputStream in) throws IOException
- Parameters:
in
- the stream to read the packet from.- Throws:
IOException
-
DSAPublicBCPGKey
public DSAPublicBCPGKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y)
-
-
Method Detail
-
getFormat
public String getFormat()
return "PGP"- Specified by:
getFormat
in interfaceBCPGKey
- Returns:
- "RAW" or "PGP"
- See Also:
BCPGKey.getFormat()
-
getEncoded
public byte[] getEncoded()
return the standard PGP encoding of the key.- Specified by:
getEncoded
in interfaceBCPGKey
- Specified by:
getEncoded
in interfaceorg.bouncycastle.util.Encodable
- Overrides:
getEncoded
in classBCPGObject
- Returns:
- byte[]
- See Also:
BCPGKey.getEncoded()
-
encode
public void encode(BCPGOutputStream out) throws IOException
- Specified by:
encode
in classBCPGObject
- Throws:
IOException
-
getG
public BigInteger getG()
- Returns:
- g
-
getP
public BigInteger getP()
- Returns:
- p
-
getQ
public BigInteger getQ()
- Returns:
- q
-
getY
public BigInteger getY()
- Returns:
- g
-
-