Bouncy Castle Cryptography Library 1.79

org.bouncycastle.bcpg
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
 void encode(BCPGOutputStream out)
           
 byte[] getEncoded()
          return the standard PGP encoding of the key.
 java.lang.String getFormat()
          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[] getKey()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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()

getFormat

public java.lang.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
Following copied from interface: org.bouncycastle.bcpg.BCPGKey
Returns:
"RAW" or "PGP"

encode

public void encode(BCPGOutputStream out)
            throws java.io.IOException
Overrides:
encode in class BCPGObject

getKey

public byte[] getKey()

Bouncy Castle Cryptography Library 1.79