pub struct ContextAuthenticator { /* private fields */ }Expand description
Creates and authenticates fidl_fuchsia_pkg::ResolutionContexts using an HMAC.
The contexts contain the hash of the superpackage.
Implementations§
Source§impl ContextAuthenticator
impl ContextAuthenticator
Sourcepub fn create(self, hash: &Hash) -> ResolutionContext
pub fn create(self, hash: &Hash) -> ResolutionContext
Create a fidl_fuchsia_pkg::ResolutionContext, tagged by this ContextAuthenticator’s
secret key, capable of being authenticated by self.authenticate(context).
Sourcepub fn authenticate(
self,
context: ResolutionContext,
) -> Result<Hash, ContextAuthenticatorError>
pub fn authenticate( self, context: ResolutionContext, ) -> Result<Hash, ContextAuthenticatorError>
Authenticate a fidl_fuchsia_pkg::ResolutionContext and return the wrapped
fuchsia_hash::Hash.
Trait Implementations§
Source§impl Clone for ContextAuthenticator
impl Clone for ContextAuthenticator
Source§fn clone(&self) -> ContextAuthenticator
fn clone(&self) -> ContextAuthenticator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextAuthenticator
impl Debug for ContextAuthenticator
Auto Trait Implementations§
impl Freeze for ContextAuthenticator
impl RefUnwindSafe for ContextAuthenticator
impl Send for ContextAuthenticator
impl Sync for ContextAuthenticator
impl Unpin for ContextAuthenticator
impl UnwindSafe for ContextAuthenticator
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