Browse Source

fix some deteails in tests

tags/v0.0.1
Henry Case 3 years ago
parent
commit
7023b7f0ff
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      test/katrunner/src/main.rs

+ 3
- 4
test/katrunner/src/main.rs View File

@@ -14,14 +14,13 @@ struct Register {


fn signature_scheme(el: &TestVector) { fn signature_scheme(el: &TestVector) {


let mut msg = Vec::new();
msg.resize(el.sig.msg.len(), 0);
msg.extend(el.sig.msg.iter().copied());
unsafe { unsafe {
let p = pqc_sig_alg_by_id(el.scheme_id as u8); let p = pqc_sig_alg_by_id(el.scheme_id as u8);
assert_ne!(p.is_null(), true);
assert_eq!( assert_eq!(
pqc_sig_verify(p, msg.as_mut_ptr(), el.sig.msg.len() as u64,
pqc_sig_verify(p,
el.sig.sm.as_ptr(), el.sig.sm.len() as u64, el.sig.sm.as_ptr(), el.sig.sm.len() as u64,
el.sig.msg.as_ptr(), el.sig.msg.len() as u64,
el.sig.pk.as_ptr()), el.sig.pk.as_ptr()),
true); true);
} }


Loading…
Cancel
Save