Struct schnorr_fun::Message
source · 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§
source§impl<'a, S: Secrecy> Message<'a, S>
impl<'a, S: Secrecy> Message<'a, S>
sourcepub fn raw(bytes: &'a [u8]) -> Self
pub fn raw(bytes: &'a [u8]) -> Self
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.
Trait Implementations§
source§impl<'a, S: PartialEq> PartialEq for Message<'a, S>
impl<'a, S: PartialEq> PartialEq for Message<'a, S>
impl<'a, S: Copy> Copy for Message<'a, S>
impl<'a, S> StructuralPartialEq for Message<'a, S>
Auto Trait Implementations§
impl<'a, S> RefUnwindSafe for Message<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Message<'a, S>where
S: Send,
impl<'a, S> Sync for Message<'a, S>where
S: Sync,
impl<'a, S> Unpin for Message<'a, S>where
S: Unpin,
impl<'a, S> UnwindSafe for Message<'a, S>where
S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more