pub struct IncrementalSigner { /* private fields */ }Expand description
Multi-part (incremental) interface for SigningKeyPair.
Implementations§
Source§impl IncrementalSigner
impl IncrementalSigner
Sourcepub fn update<Message: Bytes>(&mut self, message: &Message)
pub fn update<Message: Bytes>(&mut self, message: &Message)
Updates the state for this incremental signer with message.
Sourcepub fn finalize<Signature: NewByteArray<CRYPTO_SIGN_BYTES>, SecretKey: ByteArray<CRYPTO_SIGN_SECRETKEYBYTES>>(
self,
secret_key: &SecretKey,
) -> Result<Signature, Error>
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.
Sourcepub fn verify<Signature: ByteArray<CRYPTO_SIGN_BYTES>, PublicKey: ByteArray<CRYPTO_SIGN_PUBLICKEYBYTES>>(
self,
signature: &Signature,
public_key: &PublicKey,
) -> Result<(), Error>
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§
Auto Trait Implementations§
impl Freeze for IncrementalSigner
impl RefUnwindSafe for IncrementalSigner
impl Send for IncrementalSigner
impl Sync for IncrementalSigner
impl Unpin for IncrementalSigner
impl UnsafeUnpin for IncrementalSigner
impl UnwindSafe for IncrementalSigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more