[]Struct cjdns_crypto::sign::State

pub struct State(_);

State for multi-part (streaming) computation of signature.

Implementations

impl State

pub fn init() -> State

init() initialize a streaming signing state.

pub fn update(&mut self, m: &[u8])

update() can be called more than once in order to compute the digest from sequential chunks of the message.

pub fn finalize(self, &SecretKey) -> Signature

finalize() finalizes the hashing computation and returns a Signature.

pub fn verify(&mut self, sig: &Signature, &PublicKey) -> bool

verify verifies the signature in sm using the signer's public key pk.

Trait Implementations

impl Clone for State

impl Copy for State

impl Debug for State

impl Default for State

Auto Trait Implementations

impl RefUnwindSafe for State

impl Send for State

impl Sync for State

impl Unpin for State

impl UnwindSafe for State

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> 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.