Struct Message
pub struct Message(/* private fields */);
Expand description
A (hashed) message input to an ECDSA signature.
Implementations§
§impl Message
impl Message
pub fn from_slice(digest: &[u8]) -> Result<Message, Error>
👎Deprecated since 0.28.0: use from_digest_slice instead
pub fn from_slice(digest: &[u8]) -> Result<Message, Error>
Creates a Message
from a 32 byte slice digest
.
Converts a MESSAGE_SIZE
-byte slice to a message object. WARNING: the slice has to be a
cryptographically secure hash of the actual message that’s going to be signed. Otherwise
the result of signing isn’t a
secure signature.
pub fn from_digest(digest: [u8; 32]) -> Message
pub fn from_digest(digest: [u8; 32]) -> Message
Creates a Message
from a digest
.
The digest
array has to be a cryptographically secure hash of the actual message that’s
going to be signed. Otherwise the result of signing isn’t a secure signature.
pub fn from_digest_slice(digest: &[u8]) -> Result<Message, Error>
pub fn from_digest_slice(digest: &[u8]) -> Result<Message, Error>
Creates a Message
from a 32 byte slice digest
.
The slice has to be 32 bytes long and be a cryptographically secure hash of the actual message that’s going to be signed. Otherwise the result of signing isn’t a secure signature.
§Errors
If digest
is not exactly 32 bytes long.
Trait Implementations§
§impl From<LegacySighash> for Message
impl From<LegacySighash> for Message
§fn from(hash: LegacySighash) -> Message
fn from(hash: LegacySighash) -> Message
§impl From<SegwitV0Sighash> for Message
impl From<SegwitV0Sighash> for Message
§fn from(hash: SegwitV0Sighash) -> Message
fn from(hash: SegwitV0Sighash) -> Message
§impl<T> From<T> for Messagewhere
T: ThirtyTwoByteHash,
impl<T> From<T> for Messagewhere
T: ThirtyTwoByteHash,
§impl From<TapSighash> for Message
impl From<TapSighash> for Message
§fn from(hash: TapSighash) -> Message
fn from(hash: TapSighash) -> Message
§impl Ord for Message
impl Ord for Message
§impl PartialOrd for Message
impl PartialOrd for Message
impl Copy for Message
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request