StaticnewStaticrandomGenerate a new random X25519PrivateKey.
StaticnewGenerate a new random X25519PrivateKey using provided RNG.
StatickeypairGenerate a new random X25519PrivateKey and corresponding X25519PublicKey.
StatickeypairGenerate a new random X25519PrivateKey and corresponding X25519PublicKey using the given random number generator.
StaticderiveDerive an X25519PrivateKey from the given key material.
The key material to derive from
A new X25519PrivateKey derived from the key material
StaticfromRestore an X25519PrivateKey from a fixed-size array of bytes.
StaticfromRestore an X25519PrivateKey from a reference to an array of bytes. Validates the length.
StaticfromCreate an X25519PrivateKey from raw bytes (legacy alias).
StaticfromGet a reference to the fixed-size array of bytes.
Get the raw private key bytes (copy).
Get hex string representation.
Get hex string representation (alias for hex()).
Get base64 representation.
Get the X25519PublicKey corresponding to this X25519PrivateKey.
Derive a shared symmetric key from this X25519PrivateKey and the given X25519PublicKey.
The other party's public key
A SymmetricKey derived from the shared secret
Perform ECDH key agreement with a public key (legacy method).
Get string representation.
Returns the CBOR tags associated with X25519PrivateKey.
Returns the untagged CBOR encoding (as a byte string).
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates an X25519PrivateKey by decoding it from untagged CBOR.
Creates an X25519PrivateKey by decoding it from tagged CBOR.
StaticfromStaticfromStatic method to decode from tagged CBOR binary data.
StaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation of the X25519PrivateKey. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.
Returns the UR string representation.
StaticfromStaticfrom
Generate a new random X25519PrivateKey.