Package 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/Secret BCPGKey which is encoded as an array of octets rather than an MPI.
-
Method Summary
Modifier and TypeMethodDescriptionvoidencode(BCPGOutputStream out) 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[]getKey()
-
Method Details
-
getEncoded
public byte[] getEncoded()return the standard PGP encoding of the key.- Specified by:
getEncodedin interfaceBCPGKey- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Overrides:
getEncodedin classBCPGObject- Returns:
- byte[]
- See Also:
-
getFormat
Description copied from interface:BCPGKeyReturn 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. -
encode
- Specified by:
encodein classBCPGObject- Throws:
IOException
-
getKey
public byte[] getKey()
-