[][src]Struct mundane::public::ed25519::Ed25519Signature

pub struct Ed25519Signature { /* fields omitted */ }

An Ed25519 signature.


impl Ed25519Signature[src]

#[must_use] pub fn from_bytes(bytes: [u8; 64]) -> Ed25519Signature[src]

Constructs an Ed25519Signature signature from raw bytes.

#[must_use] pub fn bytes(&self) -> &[u8; 64][src]

Gets the raw bytes of the signature.

#[must_use] pub fn sign_ed25519(key: &Ed25519PrivKey, message: &[u8]) -> Ed25519Signature[src]

Sign a message.

Ed25519Signature implements Signature, but Signature's sign function conservatively returns a Result. Ed25519 signatures never fail, so this function is provided to allow the user to compute an Ed25519 signature without having to perform error checking.

Trait Implementations

impl Signature for Ed25519Signature[src]

type PrivateKey = Ed25519PrivKey

The private key type used to generate this signature.

fn sign(key: &Ed25519PrivKey, message: &[u8]) -> Result<Ed25519Signature, Error>[src]

Sign a message.

Though the Signature trait requires that sign return a Result, Ed25519Signature's implementation is guaranteed to always return Ok. Callers may prefer the sign_ed25519 function, which returns an Ed25519Signature rather than a Result.

impl Debug for Ed25519Signature[src]

Auto Trait Implementations

impl Send for Ed25519Signature

impl Unpin for Ed25519Signature

impl Sync for Ed25519Signature

impl RefUnwindSafe for Ed25519Signature

impl UnwindSafe for Ed25519Signature

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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