Bouncy Castle Cryptography Library 1.81

org.bouncycastle.bcpg
Class ECPublicBCPGKey

java.lang.Object
  extended byorg.bouncycastle.bcpg.BCPGObject
      extended byorg.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.


Constructor Summary
protected ECPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.math.BigInteger encodedPoint)
           
protected ECPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, org.bouncycastle.math.ec.ECPoint point)
           
protected ECPublicBCPGKey(BCPGInputStream in)
           
 
Method Summary
 void encode(BCPGOutputStream out)
           
 org.bouncycastle.asn1.ASN1ObjectIdentifier getCurveOID()
           
 byte[] getEncoded()
          return the standard PGP encoding of the key.
 java.math.BigInteger getEncodedPoint()
           
 java.lang.String getFormat()
          return "PGP"
protected static byte[] readBytesOfEncodedLength(BCPGInputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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

Bouncy Castle Cryptography Library 1.81