pub trait ClientVerify<const HASH_LEN: usize, const SIGNATURE_LEN: usize> {
// Required method
fn verification_done(
&self,
result: Result<bool, ErrorCode>,
hash: &'static mut [u8; HASH_LEN],
signature: &'static mut [u8; SIGNATURE_LEN],
);
}Expand description
This trait provides callbacks for when the verification has completed.
Required Methods§
Sourcefn verification_done(
&self,
result: Result<bool, ErrorCode>,
hash: &'static mut [u8; HASH_LEN],
signature: &'static mut [u8; SIGNATURE_LEN],
)
fn verification_done( &self, result: Result<bool, ErrorCode>, hash: &'static mut [u8; HASH_LEN], signature: &'static mut [u8; SIGNATURE_LEN], )
Called when the verification is complete.
If the verification operation encounters an error, result will be a
Result::Err() specifying the ErrorCode. Otherwise, result will be a
Result::Ok set to Ok(true) if the signature was correctly verified
and Ok(false) otherwise.
If verification operation did encounter errors result will be Err()
with an appropriate ErrorCode. Valid ErrorCodes include:
CANCEL: the operation was cancelled.FAIL: an internal failure.