Type Alias AppCheckerSignatureComponentType

Source
pub type AppCheckerSignatureComponentType<S, H, const HL: usize, const SL: usize> = AppCheckerSignature<'static, S, H, HL, SL>;

Aliased Type§

struct AppCheckerSignatureComponentType<S, H, const HL: usize, const SL: usize> { /* private fields */ }

Implementations

Source§

impl<'a, S, H, const HL: usize, const SL: usize> AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source

pub fn new( hasher: &'a H, verifier: &'a S, hash_buffer: &'static mut [u8; HL], signature_buffer: &'static mut [u8; SL], credential_type: TbfFooterV2CredentialsType, ) -> AppCheckerSignature<'a, S, H, HL, SL>

Trait Implementations

Source§

impl<'a, S, H, const HL: usize, const SL: usize> AppCredentialsPolicy<'static> for AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source§

fn require_credentials(&self) -> bool

Whether credentials are required or not. Read more
Source§

fn check_credentials( &self, credentials: TbfFooterV2Credentials, binary: &'static [u8], ) -> Result<(), (ErrorCode, TbfFooterV2Credentials, &'static [u8])>

Check a particular credential. Read more
Source§

fn set_client(&self, client: &'static dyn AppCredentialsPolicyClient<'static>)

Set the client which gets notified after the credential check completes.
Source§

impl<'a, S, H, const HL: usize, const SL: usize> ClientData<HL> for AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source§

fn add_mut_data_done( &self, _result: Result<(), ErrorCode>, _data: SubSliceMut<'static, u8>, )

Called when the data has been added to the digest. data is the SubSliceMut passed in the call to add_mut_data, whose active slice contains the data that was not added. On Ok, data has an active slice of size zero (all data was added). Valid ErrorCode values are: Read more
Source§

fn add_data_done( &self, result: Result<(), ErrorCode>, data: SubSlice<'static, u8>, )

Called when the data has been added to the digest. data is the SubSlice passed in the call to add_data, whose active slice contains the data that was not added. On Ok, data has an active slice of size zero (all data was added). Valid ErrorCode values are: Read more
Source§

impl<'a, S, H, const HL: usize, const SL: usize> ClientHash<HL> for AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source§

fn hash_done( &self, result: Result<(), ErrorCode>, digest: &'static mut [u8; HL], )

Called when a digest is computed. digest is the same reference passed to run() to store the hash value. If result is Ok, digest stores the computed hash. If result is Err, the data stored in digest is undefined and may have any value. Valid ErrorCode values are: Read more
Source§

impl<'a, S, H, const HL: usize, const SL: usize> ClientVerify<HL> for AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source§

fn verification_done( &self, _result: Result<bool, ErrorCode>, _compare: &'static mut [u8; HL], )

Called when a verification is computed. compare is the reference supplied to verify() and the data stored in compare is unchanged. On Ok the bool indicates if the computed hash matches the value in compare. Valid ErrorCode values are: Read more
Source§

impl<'a, S, H, const HL: usize, const SL: usize> ClientVerify<HL, SL> for AppCheckerSignature<'a, S, H, HL, SL>
where S: SignatureVerify<'static, HL, SL>, H: DigestDataHash<'a, HL>,

Source§

fn verification_done( &self, result: Result<bool, ErrorCode>, hash: &'static mut [u8; HL], signature: &'static mut [u8; SL], )

Called when the verification is complete. Read more