[][src]Struct selenite::crypto::SphincsKeypair

pub struct SphincsKeypair {
    pub algorithm: String,
    pub public_key: String,
    pub private_key: String,
}

SPHINCS+ (SHAKE256) Keypair

When using this keypair or looking at its documentation, please look at its implemented trait Keypairs for its methods.

use selenite::crypto::*;
 
fn main() {
    // Generates The Respected Keypair
    let keypair = SphincsKeypair::new();
 
    // Signs The Message as a UTF-8 Encoded String
    let mut sig = keypair.sign("message_to_sign");
     
    // Returns a boolean representing whether the signature is valid or not
    let is_verified = sig.verify();
}

Fields

algorithm: Stringpublic_key: Stringprivate_key: String

Trait Implementations

impl Clone for SphincsKeypair[src]

impl Debug for SphincsKeypair[src]

impl Default for SphincsKeypair[src]

impl<'de> Deserialize<'de> for SphincsKeypair[src]

impl Hash for SphincsKeypair[src]

impl Keypairs for SphincsKeypair[src]

impl PartialEq<SphincsKeypair> for SphincsKeypair[src]

impl PartialOrd<SphincsKeypair> for SphincsKeypair[src]

impl Serialize for SphincsKeypair[src]

impl StructuralPartialEq for SphincsKeypair[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.