Struct lamport_signature::Signature
[−]
[src]
pub struct Signature { /* fields omitted */ }
A signature data generated by PrivateKey.
Methods
impl Signature
[src]
pub fn from_bytes<T, U>(bytes: &mut U) -> Result<Signature, Error> where
T: Digest,
U: Read,
[src]
T: Digest,
U: Read,
Constructs a Signature from the object implements std::io::Read, like std::fs::File.
Example
extern crate sha2; extern crate lamport_signature; use std::fs::File; use std::io::Read; use sha2::Sha256; use lamport_signature::Signature; let mut file = File::open("signed_data").unwrap(); assert!(Signature::from_bytes::<Sha256, _>(&mut file).is_ok());
pub fn to_bytes(&self) -> Vec<u8>
[src]
Converts the inner signature data into a linearized vector.
Trait Implementations
impl Debug for Signature
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Signature
[src]
fn clone(&self) -> Signature
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Signature
[src]
fn eq(&self, __arg_0: &Signature) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Signature) -> bool
[src]
This method tests for !=
.
impl Eq for Signature
[src]
impl PartialOrd for Signature
[src]
fn partial_cmp(&self, __arg_0: &Signature) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Signature) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Signature) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Signature) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Signature) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Signature
[src]
fn cmp(&self, __arg_0: &Signature) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more