Skip to main content

Ed25519Signer

Struct Ed25519Signer 

Source
pub struct Ed25519Signer { /* private fields */ }
Expand description

Signs records with an Ed25519 key the host supplies. Key generation and storage are host concerns; the crate only consumes the 32 secret bytes.

Implementations§

Source§

impl Ed25519Signer

Source

pub fn from_secret_bytes(secret: &[u8; 32]) -> Self

Build a signer from 32 secret key bytes (RFC 8032 seed).

Source

pub fn public_key(&self) -> PublicKeyBytes

The signer’s public key bytes.

Source

pub fn public_key_hex(&self) -> String

The signer’s public key as lowercase hex - the Signature.key_id this signer produces.

Source

pub fn sign(&self, record: &Record) -> Result<Signature, Error>

Sign a record’s domain-separated canonical signing form. The record’s id and any existing signature are excluded by construction.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.