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 TypeMethodDescriptionvoid
encode
(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:
getEncoded
in interfaceBCPGKey
- Specified by:
getEncoded
in interfaceorg.bouncycastle.util.Encodable
- Overrides:
getEncoded
in classBCPGObject
- Returns:
- byte[]
- See Also:
-
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. -
encode
- Specified by:
encode
in classBCPGObject
- Throws:
IOException
-
getKey
public byte[] getKey()
-