Retrieve Wycheproof test vectors from the given filename in a Wycheproof repo.
(wycheproof_dir: &str, filename: &str)
| 108 | |
| 109 | /// Retrieve Wycheproof test vectors from the given filename in a Wycheproof repo. |
| 110 | pub fn data(wycheproof_dir: &str, filename: &str) -> Vec<u8> { |
| 111 | let path = std::path::Path::new(&wycheproof_dir) |
| 112 | .join("testvectors") |
| 113 | .join(filename); |
| 114 | std::fs::read(&path) |
| 115 | .unwrap_or_else(|_| panic!("Test vector file {filename} not found at {path:?}")) |
| 116 | } |
| 117 | |
| 118 | /// Build a description for a test case in a suite |
| 119 | pub fn description(suite: &Suite, case: &Case) -> String { |