diff options
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r-- | src/Common/Dlgcode.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index ffb62ecb..c19e1992 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -4363,6 +4363,7 @@ static BOOL PerformBenchmark(HWND hwndDlg) WHIRLPOOL_CTX wctx;
RMD160_CTX rctx;
sha512_ctx s2ctx;
+ sha256_ctx s256ctx;
int hid;
for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
@@ -4379,6 +4380,12 @@ static BOOL PerformBenchmark(HWND hwndDlg) sha512_end ((unsigned char *) digest, &s2ctx);
break;
+ case SHA256:
+ sha256_begin (&s256ctx);
+ sha256_hash (lpTestBuffer, benchmarkBufferSize, &s256ctx);
+ sha256_end ((unsigned char *) digest, &s256ctx);
+ break;
+
case RIPEMD160:
RMD160Init(&rctx);
RMD160Update(&rctx, lpTestBuffer, benchmarkBufferSize);
@@ -4433,6 +4440,11 @@ static BOOL PerformBenchmark(HWND hwndDlg) derive_key_sha512 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
break;
+ case SHA256:
+ /* PKCS-5 test with HMAC-SHA-256 used as the PRF */
+ derive_key_sha256 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
+ break;
+
case RIPEMD160:
/* PKCS-5 test with HMAC-RIPEMD-160 used as the PRF */
derive_key_ripemd160 (FALSE, "passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
|