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

Function generator

wycheproof2blb/src/ed25519.rs:47–67  ·  view source on GitHub ↗
(data: &[u8], algorithm: &str, _key_size: u32)

Source from the content-addressed store, hash-verified

45}
46
47pub fn generator(data: &[u8], algorithm: &str, _key_size: u32) -> Vec<TestInfo> {
48 let suite: TestSuite = serde_json::from_slice(data).unwrap();
49 assert_eq!(algorithm, suite.suite.algorithm);
50
51 let mut infos = vec![];
52 for g in &suite.test_groups {
53 for tc in &g.tests {
54 infos.push(TestInfo {
55 data: vec![
56 g.key.sk.clone(),
57 g.key.pk.clone(),
58 tc.msg.clone(),
59 tc.sig.clone(),
60 vec![case_result(&tc.case)],
61 ],
62 desc: description(&suite.suite, &tc.case),
63 });
64 }
65 }
66 infos
67}

Callers

nothing calls this directly

Calls 2

descriptionFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected