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