Benchmark, SM3: fix full hash testing

Test now has an array of hashes.
Use only first hash when testing full digest operation.
This commit is contained in:
Sean Parkinson
2024-05-01 09:57:13 +10:00
parent 4594151588
commit db6b1388ce

View File

@ -7475,12 +7475,12 @@ void bench_sm3(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
ret = wc_InitSm3(hash, HEAP_HINT,
ret = wc_InitSm3(hash[0], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID);
if (ret == 0)
ret = wc_Sm3Update(hash, bench_plain, bench_size);
ret = wc_Sm3Update(hash[0], bench_plain, bench_size);
if (ret == 0)
ret = wc_Sm3Final(hash, digest[0]);
ret = wc_Sm3Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sm3;
RECORD_MULTI_VALUE_STATS();