pub struct DigestStrategy {
pub algorithm: DigestAlgorithm,
}Expand description
A digest strategy bundles the algorithm with any future policy knobs (output truncation, pre-hash prefix, etc.). Today it’s a thin newtype; the wrapper exists so extensions don’t churn call sites.
Fields§
§algorithm: DigestAlgorithmThe algorithm to apply.
Implementations§
Source§impl DigestStrategy
impl DigestStrategy
Sourcepub const fn blake3_untagged() -> Self
pub const fn blake3_untagged() -> Self
Plain untagged BLAKE3 over canonical bytes.
Sourcepub const fn blake3_keyed(key: [u8; 32]) -> Self
pub const fn blake3_keyed(key: [u8; 32]) -> Self
Keyed BLAKE3 over canonical bytes.
Sourcepub fn blake3_domain_separated(context: impl Into<String>) -> Self
pub fn blake3_domain_separated(context: impl Into<String>) -> Self
Domain-separated BLAKE3 over canonical bytes.
Sourcepub const fn sha256() -> Self
pub const fn sha256() -> Self
SHA-256 over canonical bytes. Presently returns
JcsError::UnsupportedAlgorithm at call time; the constructor is
provided so policy code can reference it today.
Trait Implementations§
Source§impl Clone for DigestStrategy
impl Clone for DigestStrategy
Source§fn clone(&self) -> DigestStrategy
fn clone(&self) -> DigestStrategy
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 DigestStrategy
impl Debug for DigestStrategy
Source§impl PartialEq for DigestStrategy
impl PartialEq for DigestStrategy
impl Eq for DigestStrategy
impl StructuralPartialEq for DigestStrategy
Auto Trait Implementations§
impl Freeze for DigestStrategy
impl RefUnwindSafe for DigestStrategy
impl Send for DigestStrategy
impl Sync for DigestStrategy
impl Unpin for DigestStrategy
impl UnsafeUnpin for DigestStrategy
impl UnwindSafe for DigestStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.