pub trait XofAlgorithm {
const SECURITY_LEVEL: usize;
const MIN_OUTPUT_SIZE: usize;
const MAX_OUTPUT_SIZE: Option<usize>;
const ALGORITHM_ID: &'static str;
// Provided methods
fn name() -> &'static str { ... }
fn validate_output_length(len: usize) -> Result<()> { ... }
}
Expand description
Trait for XOF algorithms with compile-time guarantees
Required Associated Constants§
Sourceconst SECURITY_LEVEL: usize
const SECURITY_LEVEL: usize
Security level in bits
Sourceconst MIN_OUTPUT_SIZE: usize
const MIN_OUTPUT_SIZE: usize
Minimum recommended output size in bytes
Sourceconst MAX_OUTPUT_SIZE: Option<usize>
const MAX_OUTPUT_SIZE: Option<usize>
Maximum output size in bytes (None for unlimited)
Sourceconst ALGORITHM_ID: &'static str
const ALGORITHM_ID: &'static str
Algorithm identifier
Provided Methods§
Sourcefn validate_output_length(len: usize) -> Result<()>
fn validate_output_length(len: usize) -> Result<()>
Validate output length
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.