Struct eznacl::SigningPair
source · [−]pub struct SigningPair { /* private fields */ }
Expand description
An Ed25519 asymmetric signing keypair
Implementations
sourceimpl SigningPair
impl SigningPair
sourcepub fn from(
verkey: &CryptoString,
signkey: &CryptoString
) -> Result<SigningPair, EzNaclError>
pub fn from(
verkey: &CryptoString,
signkey: &CryptoString
) -> Result<SigningPair, EzNaclError>
Creates a SigningPair from two CryptoString objects
sourcepub fn from_strings(
verstr: &str,
signstr: &str
) -> Result<SigningPair, EzNaclError>
pub fn from_strings(
verstr: &str,
signstr: &str
) -> Result<SigningPair, EzNaclError>
Creates a SigningPair from two strings containing CryptoString-formatted data
sourcepub fn generate(algorithm: &str) -> Result<SigningPair, EzNaclError>
pub fn generate(algorithm: &str) -> Result<SigningPair, EzNaclError>
Generates a new ED25519 asymmetric encryption keypair.
Trait Implementations
sourceimpl Clone for SigningPair
impl Clone for SigningPair
sourcefn clone(&self) -> SigningPair
fn clone(&self) -> SigningPair
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl CryptoInfo for SigningPair
impl CryptoInfo for SigningPair
sourceimpl Debug for SigningPair
impl Debug for SigningPair
sourceimpl PartialEq<SigningPair> for SigningPair
impl PartialEq<SigningPair> for SigningPair
sourcefn eq(&self, other: &SigningPair) -> bool
fn eq(&self, other: &SigningPair) -> bool
sourceimpl PartialOrd<SigningPair> for SigningPair
impl PartialOrd<SigningPair> for SigningPair
sourcefn partial_cmp(&self, other: &SigningPair) -> Option<Ordering>
fn partial_cmp(&self, other: &SigningPair) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl PrivateKey for SigningPair
impl PrivateKey for SigningPair
sourcefn get_private_key(&self) -> CryptoString
fn get_private_key(&self) -> CryptoString
Returns the private key as a CryptoString object
sourcefn get_private_str(&self) -> String
fn get_private_str(&self) -> String
Returns the private key as a string
sourceimpl PublicKey for SigningPair
impl PublicKey for SigningPair
sourcefn get_public_key(&self) -> CryptoString
fn get_public_key(&self) -> CryptoString
Returns the public key as a CryptoString object
sourcefn get_public_str(&self) -> String
fn get_public_str(&self) -> String
Returns the public key as a string
sourceimpl Sign for SigningPair
impl Sign for SigningPair
sourcefn sign(&self, data: &[u8]) -> Result<CryptoString, EzNaclError>
fn sign(&self, data: &[u8]) -> Result<CryptoString, EzNaclError>
Signs the provided data using the Ed25519 algorithm
sourceimpl VerifySignature for SigningPair
impl VerifySignature for SigningPair
sourcefn verify(
&self,
data: &[u8],
signature: &CryptoString
) -> Result<bool, EzNaclError>
fn verify(
&self,
data: &[u8],
signature: &CryptoString
) -> Result<bool, EzNaclError>
Verifies the Ed25519 signature against the provided data
impl StructuralPartialEq for SigningPair
Auto Trait Implementations
impl RefUnwindSafe for SigningPair
impl Send for SigningPair
impl Sync for SigningPair
impl Unpin for SigningPair
impl UnwindSafe for SigningPair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more