[][src]Enum schnorr_fun::MessageKind

pub enum MessageKind {
    Prehashed,
    Plain {
        tag: &'static str,
    },
}

Describes the kind of messages that will be signed with a Schnorr instance.

Variants

Prehashed

Sign a pre-hashed message. This is used by BIP-341 to authorize transactions. If you also want to sign hashed messages in your applicatin you should use a tagged hash specific to your application.

Plain

Sign an ordinary variable length message.

Fields of Plain

tag: &'static str

You must provide a tag to separate signatures from your application from other applications. If two Schnorr instances are created with a different tag then a signature valid for one will never be valid for the other.

Trait Implementations

impl Clone for MessageKind[src]

impl Copy for MessageKind[src]

impl Debug for MessageKind[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Mark for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.