pub struct AuditHmacKey(/* private fields */);Expand description
Fixed-length HMAC-SHA256 key. Held inside an Arc for cheap
sharing across the access-log flusher and any verifier callers.
Implementations§
Source§impl AuditHmacKey
impl AuditHmacKey
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Parse a key from a CLI-style spec. Three forms:
raw:<utf8 bytes>— the bytes after the prefix are the key verbatim. Useful for tests and small ops; production should preferhex:orbase64:.hex:<hex chars>— even-length, all-hex.base64:<base64 chars>— standard base64, padding optional.
Minimum decoded length: 16 bytes (128 bits). HMAC-SHA256 itself permits any key length, but anything <16 bytes is operator error rather than a sound choice.
Trait Implementations§
Source§impl Clone for AuditHmacKey
impl Clone for AuditHmacKey
Source§fn clone(&self) -> AuditHmacKey
fn clone(&self) -> AuditHmacKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AuditHmacKey
impl Debug for AuditHmacKey
Auto Trait Implementations§
impl Freeze for AuditHmacKey
impl RefUnwindSafe for AuditHmacKey
impl Send for AuditHmacKey
impl Sync for AuditHmacKey
impl Unpin for AuditHmacKey
impl UnsafeUnpin for AuditHmacKey
impl UnwindSafe for AuditHmacKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.