Class OctetArrayBCPGKey

java.lang.Object
org.bouncycastle.bcpg.BCPGObject
org.bouncycastle.bcpg.OctetArrayBCPGKey
All Implemented Interfaces:
BCPGKey, org.bouncycastle.util.Encodable
Direct Known Subclasses:
Ed25519PublicBCPGKey, Ed25519SecretBCPGKey, Ed448PublicBCPGKey, Ed448SecretBCPGKey, UnknownBCPGKey, X25519PublicBCPGKey, X25519SecretBCPGKey, X448PublicBCPGKey, X448SecretBCPGKey

public abstract class OctetArrayBCPGKey extends BCPGObject implements BCPGKey
Public/Secret BCPGKey which is encoded as an array of octets rather than an MPI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    byte[]
    return the standard PGP encoding of the key.
    Return the base format for this key - in the case of the symmetric keys it will generally be raw indicating that the key is just a straight byte representation, for an asymmetric key the format will be PGP, indicating the key is a string of MPIs or octets encoded in PGP format.
    byte[]
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getEncoded

      public byte[] getEncoded()
      return the standard PGP encoding of the key.
      Specified by:
      getEncoded in interface BCPGKey
      Specified by:
      getEncoded in interface org.bouncycastle.util.Encodable
      Overrides:
      getEncoded in class BCPGObject
      Returns:
      byte[]
      See Also:
    • getFormat

      public String getFormat()
      Description copied from interface: BCPGKey
      Return the base format for this key - in the case of the symmetric keys it will generally be raw indicating that the key is just a straight byte representation, for an asymmetric key the format will be PGP, indicating the key is a string of MPIs or octets encoded in PGP format.
      Specified by:
      getFormat in interface BCPGKey
      Returns:
      "RAW" or "PGP"
    • encode

      public void encode(BCPGOutputStream out) throws IOException
      Specified by:
      encode in class BCPGObject
      Throws:
      IOException
    • getKey

      public byte[] getKey()