Skip to content

Commit db6b138

Browse files
committed
Benchmark, SM3: fix full hash testing
Test now has an array of hashes. Use only first hash when testing full digest operation.
1 parent 4594151 commit db6b138

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

wolfcrypt/benchmark/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7475,12 +7475,12 @@ void bench_sm3(int useDeviceID)
74757475
bench_stats_start(&count, &start);
74767476
do {
74777477
for (times = 0; times < numBlocks; times++) {
7478-
ret = wc_InitSm3(hash, HEAP_HINT,
7478+
ret = wc_InitSm3(hash[0], HEAP_HINT,
74797479
useDeviceID ? devId: INVALID_DEVID);
74807480
if (ret == 0)
7481-
ret = wc_Sm3Update(hash, bench_plain, bench_size);
7481+
ret = wc_Sm3Update(hash[0], bench_plain, bench_size);
74827482
if (ret == 0)
7483-
ret = wc_Sm3Final(hash, digest[0]);
7483+
ret = wc_Sm3Final(hash[0], digest[0]);
74847484
if (ret != 0)
74857485
goto exit_sm3;
74867486
RECORD_MULTI_VALUE_STATS();

0 commit comments

Comments
 (0)