Struct merkle_sigs::PublicKey
[−]
[src]
pub struct PublicKey { /* fields omitted */ }
A one-time signing public key
Methods
impl PublicKey
[src]
fn from_vec(vec: Vec<u8>, algorithm: &'static Algorithm) -> Option<PublicKey>
Intializes a public key with a byte vector.
Returns None
if it couldn't parse the provided data
fn to_bytes(&self) -> Vec<u8>
Serializes a public key into a byte vector
fn verify_signature(&self, signature: &Vec<Vec<u8>>, data: &[u8]) -> bool
Verifies that the signature of the data is correctly signed with the given key
Trait Implementations
impl Eq for PublicKey
[src]
impl Hash for PublicKey
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq<PublicKey> for PublicKey
[src]
fn eq(&self, other: &PublicKey) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Debug for PublicKey
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for PublicKey
[src]
fn clone(&self) -> PublicKey
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more