Struct recrypt::api::PublicSigningKey [−]
pub struct PublicSigningKey { /* fields omitted */ }
Methods
impl PublicSigningKey
impl PublicSigningKey
pub fn new(bytes: [u8; 32]) -> Self
pub fn new(bytes: [u8; 32]) -> Self
construct $t from fixed size byte array
pub fn bytes(&self) -> &[u8; 32]
pub fn bytes(&self) -> &[u8; 32]
pub fn new_from_slice(bytes: &[u8]) -> Result<PublicSigningKey, ApiErr>
pub fn new_from_slice(bytes: &[u8]) -> Result<PublicSigningKey, ApiErr>
construct $t from byte slice. Input slice must be exactly the correct length for the type.
Returns
Ok($t) or Err($ApiError::InputWrongSize]
impl PublicSigningKey
impl PublicSigningKey
pub fn verify<A: Hashable>(
&self,
message: &A,
signature: &Ed25519Signature
) -> bool
pub fn verify<A: Hashable>(
&self,
message: &A,
signature: &Ed25519Signature
) -> bool
Verify that the signature was signed by its private key over the hashable bytes of the message.
Returns true if all the values are valid and the signature can be verified.
Trait Implementations
impl Clone for PublicSigningKey
impl Clone for PublicSigningKey
fn clone(&self) -> PublicSigningKey
fn clone(&self) -> PublicSigningKey
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for PublicSigningKey
impl Copy for PublicSigningKey
impl Debug for PublicSigningKey
impl Debug for PublicSigningKey
fn fmt(&self, formatter: &mut Formatter) -> Result
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for PublicSigningKey
impl PartialEq for PublicSigningKey
fn eq(&self, other: &PublicSigningKey) -> bool
fn eq(&self, other: &PublicSigningKey) -> 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[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for PublicSigningKey
impl Eq for PublicSigningKey
Auto Trait Implementations
impl Send for PublicSigningKey
impl Send for PublicSigningKey
impl Sync for PublicSigningKey
impl Sync for PublicSigningKey