Package 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
Base class for an EC Public Key.
For subclasses, see
ECDHPublicBCPGKey
, ECDSAPublicBCPGKey
or EdDSAPublicBCPGKey
.-
Constructor Summary
ModifierConstructorDescriptionprotected
ECPublicBCPGKey
(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, BigInteger encodedPoint) protected
ECPublicBCPGKey
(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, org.bouncycastle.math.ec.ECPoint point) protected
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(BCPGOutputStream out) org.bouncycastle.asn1.ASN1ObjectIdentifier
byte[]
return the standard PGP encoding of the key.return "PGP"protected static byte[]
-
Constructor Details
-
ECPublicBCPGKey
- Parameters:
in
- the stream to read the packet from.- Throws:
IOException
-
ECPublicBCPGKey
protected ECPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, org.bouncycastle.math.ec.ECPoint point) -
ECPublicBCPGKey
-
-
Method Details
-
getFormat
return "PGP" -
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:
-
encode
- Specified by:
encode
in classBCPGObject
- Throws:
IOException
-
getEncodedPoint
- Returns:
- point
-
getCurveOID
public org.bouncycastle.asn1.ASN1ObjectIdentifier getCurveOID()- Returns:
- oid
-
readBytesOfEncodedLength
- Throws:
IOException
-