Struct ruma_signatures::Ed25519KeyPair [−][src]
pub struct Ed25519KeyPair { /* fields omitted */ }
Expand description
An Ed25519 key pair.
Implementations
Create a key pair from its constituent parts.
Initializes a new key pair.
Parameters
- document: PKCS#8 v1/v2 DER-formatted document containing the private (and optionally public) key.
- version: The “version” of the key used for this signature. Versions are used as an identifier to distinguish signatures generated from different keys but using the same algorithm on the same homeserver.
Errors
Returns an error if the public and private keys provided are invalid for the implementing algorithm.
Returns an error when the PKCS#8 document had a public key, but it doesn’t match the one generated from the private key. This is a fallback and extra validation against corruption or
Constructs a key pair from pkcs8::PrivateKeyInfo
.
Constructs a key pair from pkcs8::PrivateKeyInfo
.
Returns the public key.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ed25519KeyPair
impl Send for Ed25519KeyPair
impl Sync for Ed25519KeyPair
impl Unpin for Ed25519KeyPair
impl UnwindSafe for Ed25519KeyPair