Skip to main content

IncrementalSigner

Struct IncrementalSigner 

Source
pub struct IncrementalSigner { /* private fields */ }
Expand description

Multi-part (incremental) interface for SigningKeyPair.

Implementations§

Source§

impl IncrementalSigner

Source

pub fn new() -> Self

Returns a new incremental signer instance.

Source

pub fn update<Message: Bytes>(&mut self, message: &Message)

Updates the state for this incremental signer with message.

Source

pub fn finalize<Signature: NewByteArray<CRYPTO_SIGN_BYTES>, SecretKey: ByteArray<CRYPTO_SIGN_SECRETKEYBYTES>>( self, secret_key: &SecretKey, ) -> Result<Signature, Error>

Finalizes this incremental signer, returning the signature upon success.

§Errors

The fixed-size signature and secret-key types satisfy the current implementation’s requirements, so this function does not return an error for valid type implementations. The Result is retained for compatibility with the underlying signing API.

Source

pub fn verify<Signature: ByteArray<CRYPTO_SIGN_BYTES>, PublicKey: ByteArray<CRYPTO_SIGN_PUBLICKEYBYTES>>( self, signature: &Signature, public_key: &PublicKey, ) -> Result<(), Error>

Verifies signature as a valid signature for this signer.

§Errors

Returns an error if signature is not valid for the accumulated message and public_key.

Trait Implementations§

Source§

impl Default for IncrementalSigner

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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.