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 abstract class OctetArrayBCPGKey extends BCPGObject implements BCPGKey
Public/Secret BCPGKey which is encoded as an array of octets rather than an MPI.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
Method Detail
-
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:
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.
-
encode
public void encode(BCPGOutputStream out) throws java.io.IOException
- Specified by:
encode
in classBCPGObject
- Throws:
java.io.IOException
-
getKey
public byte[] getKey()
-
-