org.bouncycastle.bcpg
Class ECPublicBCPGKey
java.lang.Object
org.bouncycastle.bcpg.BCPGObject
org.bouncycastle.bcpg.ECPublicBCPGKey
- All Implemented Interfaces:
- BCPGKey, org.bouncycastle.util.Encodable
- Direct Known Subclasses:
- ECDHPublicBCPGKey, ECDSAPublicBCPGKey, EdDSAPublicBCPGKey
- public abstract class ECPublicBCPGKey
- extends BCPGObject
- implements BCPGKey
Base class for an EC Public Key.
For subclasses, see ECDHPublicBCPGKey
, ECDSAPublicBCPGKey
or EdDSAPublicBCPGKey
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ECPublicBCPGKey
protected ECPublicBCPGKey(BCPGInputStream in)
throws java.io.IOException
- Parameters:
in
- the stream to read the packet from.
ECPublicBCPGKey
protected ECPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
org.bouncycastle.math.ec.ECPoint point)
ECPublicBCPGKey
protected ECPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
java.math.BigInteger encodedPoint)
getFormat
public java.lang.String getFormat()
- return "PGP"
- Specified by:
getFormat
in interface BCPGKey
- Returns:
- "RAW" or "PGP"
- See Also:
BCPGKey.getFormat()
getEncoded
public byte[] getEncoded()
- return the standard PGP encoding of the key.
- Specified by:
getEncoded
in interface BCPGKey
- Overrides:
getEncoded
in class BCPGObject
- See Also:
BCPGKey.getEncoded()
encode
public void encode(BCPGOutputStream out)
throws java.io.IOException
- Specified by:
encode
in class BCPGObject
- Throws:
java.io.IOException
getEncodedPoint
public java.math.BigInteger getEncodedPoint()
- Returns:
- point
getCurveOID
public org.bouncycastle.asn1.ASN1ObjectIdentifier getCurveOID()
- Returns:
- oid
readBytesOfEncodedLength
protected static byte[] readBytesOfEncodedLength(BCPGInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException