mirror of
https://github.com/antontutoveanu/crystals-kyber-javascript.git
synced 2026-01-10 22:07:56 -05:00
updated test run function
This commit is contained in:
@@ -93,6 +93,8 @@ Test run [ 96 ] success
|
||||
Test run [ 97 ] success
|
||||
Test run [ 98 ] success
|
||||
Test run [ 99 ] success
|
||||
|
||||
All test runs successful.
|
||||
```
|
||||
|
||||
## Disclaimer
|
||||
|
||||
12
kyber768.js
12
kyber768.js
@@ -1269,7 +1269,7 @@ function TestK768(){
|
||||
}
|
||||
}
|
||||
|
||||
// convert hex string to byte array
|
||||
var failures = 0;
|
||||
|
||||
// for each case (100 total)
|
||||
// test if ss equals Decrypt768(c,sk)
|
||||
@@ -1282,8 +1282,18 @@ function TestK768(){
|
||||
}
|
||||
else{
|
||||
console.log("Test run [", i, "] fail");
|
||||
fail += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(failures==0){
|
||||
console.log(" ");
|
||||
console.log("All test runs successful.")
|
||||
}
|
||||
else{
|
||||
console.log(" ");
|
||||
console.log(failures, " test cases have failed.")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user