Skip to main content

Signature

Enum Signature 

Source
pub enum Signature {
    Ed25519(Ed25519Sig),
    Dilithium(DilithiumSig),
    Ed25519DilithiumHybrid(Ed25519DilithiumHybridSig),
}

Variants§

§

Ed25519(Ed25519Sig)

§

Dilithium(DilithiumSig)

§

Ed25519DilithiumHybrid(Ed25519DilithiumHybridSig)

Implementations§

Source§

impl Signature

Source

pub fn split_sig_and_data<'a>( alg: &str, data_with_sign: &'a [u8], ) -> Result<(&'a [u8], &'a [u8]), Error>

Source§

impl Signature

Source

pub fn ed25519_from_bytes_owned(bytes: Vec<u8>) -> Result<Self, Error>

Source

pub fn dilithium_from_bytes_owned(bytes: Vec<u8>) -> Result<Self, Error>

Source

pub fn ed25519_dilithium_hybrid_from_bytes_owned( bytes_x: Vec<u8>, bytes_k: Vec<u8>, ) -> Result<Self, Error>

Trait Implementations§

Source§

impl CryptoAlg for Signature

Source§

fn get_alg_str(&self) -> &'static str

Source§

impl Into<Signature> for Ed25519Sig

Source§

fn into(self) -> Signature

Converts this type into the (usually inferred) input type.
Source§

impl Into<Signature> for Ed25519DilithiumHybridSig

Source§

fn into(self) -> Signature

Converts this type into the (usually inferred) input type.
Source§

impl Into<Vec<u8>> for Signature

Source§

fn into(self) -> Vec<u8>

Converts this type into the (usually inferred) input type.
Source§

impl Sig for Signature

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.