#[non_exhaustive]pub enum DigestAlgorithm {
Blake3Untagged,
Blake3Keyed {
key: [u8; 32],
},
Blake3DomainSeparated {
context: String,
},
Sha256,
}Expand description
Digest algorithm variant.
Explicit enum so the algorithm choice is a named governance
decision rather than an implicit default.
Blake3Untagged is the plain blake3::hash
pattern; keyed and domain-separated variants carry their
differentiating input so two uses with different keys or contexts
cannot accidentally collide on a digest.
Sha256 is declared but not yet wired in this
crate; requesting it returns JcsError::UnsupportedAlgorithm.
The variant exists so receipt schemas and policy packs can
reference it without waiting for the implementation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Blake3Untagged
BLAKE3 plain hash(canonical_bytes).
Blake3Keyed
BLAKE3 keyed with a 32-byte key: keyed_hash(key, canonical_bytes).
Fields
Blake3DomainSeparated
BLAKE3 domain-separated via derive_key(context, canonical_bytes).
The context string is the domain identifier (must be a
compile-time constant in user code — BLAKE3 semantics require
it to be globally unique per domain).
Sha256
SHA-256 over canonical bytes. Declared in the API but not yet wired.
Implementations§
Trait Implementations§
Source§impl Clone for DigestAlgorithm
impl Clone for DigestAlgorithm
Source§fn clone(&self) -> DigestAlgorithm
fn clone(&self) -> DigestAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DigestAlgorithm
impl Debug for DigestAlgorithm
Source§impl PartialEq for DigestAlgorithm
impl PartialEq for DigestAlgorithm
Source§fn eq(&self, other: &DigestAlgorithm) -> bool
fn eq(&self, other: &DigestAlgorithm) -> bool
self and other values to be equal, and is used by ==.impl Eq for DigestAlgorithm
impl StructuralPartialEq for DigestAlgorithm
Auto Trait Implementations§
impl Freeze for DigestAlgorithm
impl RefUnwindSafe for DigestAlgorithm
impl Send for DigestAlgorithm
impl Sync for DigestAlgorithm
impl Unpin for DigestAlgorithm
impl UnsafeUnpin for DigestAlgorithm
impl UnwindSafe for DigestAlgorithm
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
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
key and return true if they are equal.