Package org.bouncycastle.bcpg
Class EdSecretBCPGKey
java.lang.Object
org.bouncycastle.bcpg.BCPGObject
org.bouncycastle.bcpg.EdSecretBCPGKey
- All Implemented Interfaces:
BCPGKey,org.bouncycastle.util.Encodable
Base class for an Edwards Curve (EdDSA) Secret Key.
This class is used with
PublicKeyAlgorithmTags.EDDSA_LEGACY only and MUST NOT be used with v6 keys.
Modern OpenPGP uses dedicated key types:
For PublicKeyAlgorithmTags.Ed25519 see Ed25519SecretBCPGKey instead.
For PublicKeyAlgorithmTags.Ed448 see Ed448SecretBCPGKey instead.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(BCPGOutputStream out) byte[]return the standard PGP encoding of the key.return "PGP"getX()
-
Constructor Details
-
EdSecretBCPGKey
- Parameters:
in-- Throws:
IOException
-
EdSecretBCPGKey
- Parameters:
x-
-
-
Method Details
-
getFormat
return "PGP" -
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:
-
encode
- Specified by:
encodein classBCPGObject- Throws:
IOException
-
getX
- Returns:
- x
-