Struct ruma_signatures::Ed25519KeyPair [−][src]
pub struct Ed25519KeyPair { /* fields omitted */ }
Expand description
An Ed25519 key pair.
Implementations
impl Ed25519KeyPair
[src]
impl Ed25519KeyPair
[src]pub fn new(document: &[u8], version: String) -> Result<Self, Error>
[src]
pub fn new(document: &[u8], version: String) -> Result<Self, Error>
[src]Initializes a new key pair.
Parameters
- document: PKCS8-formatted bytes containing the private & public keys.
- 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.
pub fn public_key(&self) -> &[u8]
[src]
pub fn public_key(&self) -> &[u8]
[src]Returns the public key.
Trait Implementations
impl Debug for Ed25519KeyPair
[src]
impl Debug for Ed25519KeyPair
[src]Auto Trait Implementations
impl RefUnwindSafe for Ed25519KeyPair
impl Send for Ed25519KeyPair
impl Sync for Ed25519KeyPair
impl Unpin for Ed25519KeyPair
impl UnwindSafe for Ed25519KeyPair
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]