Package org.bouncycastle.bcpg
Class X25519SecretBCPGKey
- java.lang.Object
-
- org.bouncycastle.bcpg.BCPGObject
-
- org.bouncycastle.bcpg.OctetArrayBCPGKey
-
- org.bouncycastle.bcpg.X25519SecretBCPGKey
-
- All Implemented Interfaces:
BCPGKey
,org.bouncycastle.util.Encodable
public class X25519SecretBCPGKey extends OctetArrayBCPGKey
Secret key of typePublicKeyAlgorithmTags.X25519
. This type was introduced with RFC9580 and can be used with v4, v6 keys. Note however, that legacy implementations might not understand this key type yet. For a key type compatible with legacy v4 implementations, seeECSecretBCPGKey
withPublicKeyAlgorithmTags.ECDH
. Note: Contrary toECSecretBCPGKey
usingPublicKeyAlgorithmTags.ECDH
, which uses big-endian MPI encoding to encode the secret key material,X25519SecretBCPGKey
uses native little-endian encoding.
-
-
Field Summary
Fields Modifier and Type Field Description static int
LENGTH
-
Constructor Summary
Constructors Constructor Description X25519SecretBCPGKey(byte[] key)
X25519SecretBCPGKey(BCPGInputStream in)
-
Method Summary
-
Methods inherited from class org.bouncycastle.bcpg.OctetArrayBCPGKey
encode, getEncoded, getFormat, getKey
-
-
-
-
Field Detail
-
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
X25519SecretBCPGKey
public X25519SecretBCPGKey(BCPGInputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
X25519SecretBCPGKey
public X25519SecretBCPGKey(byte[] key)
-
-