trait DigestExt: Sized {
// Required methods
fn chain_varlen(self, bytes: &[u8]) -> Self;
fn chain_opt(self, bytes: Option<&[u8]>) -> Self;
fn chain_ct(self, ct: &CiphertextBytes) -> Self;
fn chain_vk(self, vk: &VerifyingKeyBytes) -> Self;
}Expand description
Extension methods on sha2::Sha256 used by Inner::sha256 to give the constellation an
unambiguous byte encoding before hashing.
Required Methods§
Sourcefn chain_varlen(self, bytes: &[u8]) -> Self
fn chain_varlen(self, bytes: &[u8]) -> Self
Length-prefix (8-byte big-endian, platform-independent) a variable-length field.
Sourcefn chain_opt(self, bytes: Option<&[u8]>) -> Self
fn chain_opt(self, bytes: Option<&[u8]>) -> Self
A 1/0 presence byte, followed by the length-prefixed bytes when present.
Sourcefn chain_ct(self, ct: &CiphertextBytes) -> Self
fn chain_ct(self, ct: &CiphertextBytes) -> Self
Both length-prefixed ciphertext halves (ML-KEM ‖ EC).
Sourcefn chain_vk(self, vk: &VerifyingKeyBytes) -> Self
fn chain_vk(self, vk: &VerifyingKeyBytes) -> Self
Both length-prefixed halves (ed25519 ‖ ML-DSA) of a hybrid verifying key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.