org.bouncycastle.bcpg
Class EdSecretBCPGKey
java.lang.Object
|
+--org.bouncycastle.bcpg.BCPGObject
|
+--org.bouncycastle.bcpg.EdSecretBCPGKey
- All Implemented Interfaces:
- BCPGKey, org.bouncycastle.util.Encodable
- public class EdSecretBCPGKey
- extends BCPGObject
- implements BCPGKey
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:
-
OpenPGP - Algorithm-Specific Parts for EdDSALegacy Keys (deprecated)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EdSecretBCPGKey
public EdSecretBCPGKey(BCPGInputStream in)
throws java.io.IOException
- Parameters:
in
- - Throws:
java.io.IOException
-
EdSecretBCPGKey
public EdSecretBCPGKey(java.math.BigInteger x)
- Parameters:
x
-
getFormat
public java.lang.String getFormat()
- return "PGP"
- Specified by:
getFormat
in interface BCPGKey
- See Also:
BCPGKey.getFormat()
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()
encode
public void encode(BCPGOutputStream out)
throws java.io.IOException
- Overrides:
encode
in class BCPGObject
getX
public java.math.BigInteger getX()
- Returns:
- x