MCPcopy Create free account
hub / github.com/RustCrypto/utils / case_result

Function case_result

wycheproof2blb/src/wycheproof.rs:101–107  ·  view source on GitHub ↗

Convert a `result` enum to a byte.

(case: &Case)

Source from the content-addressed store, hash-verified

99
100/// Convert a `result` enum to a byte.
101pub fn case_result(case: &Case) -> u8 {
102 match case.result {
103 CaseResult::Invalid => 0u8,
104 CaseResult::Valid => 1u8,
105 _ => panic!("Unexpected case result {}", case.result),
106 }
107}
108
109/// Retrieve Wycheproof test vectors from the given filename in a Wycheproof repo.
110pub fn data(wycheproof_dir: &str, filename: &str) -> Vec<u8> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected