Struct schnorr_fun::Message[][src]

pub struct Message<'a, S = Public> {
    pub bytes: Slice<'a, S>,
    pub app_tag: Option<&'static str>,
}
Expand description

A message to be signed.

The S parameter is a Secrecy which is used when signing a verifying to check whether the challenge scalar produced with the message should be secret.

Fields

bytes: Slice<'a, S>

The message bytes

app_tag: Option<&'static str>

The optional application tag to separate the signature from other applications.

Implementations

Create a raw message with no app_tag. The message bytes will be passed straight into the challenge hash. Usually, you only use this when signing a pre-hashed message.

Signs a plain variable length message.

You must provide an application tag to make sure signatures valid in one context are not valid in another. The tag is used as described here.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Asks the item to convert itself to bytes and add itself to hash.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Returns a new instance of the invocant that will be marked with M. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.