Skip to content

Commit

Permalink
bugfixes for perf helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
vladp72 committed Oct 31, 2019
1 parent 26e5fab commit 5279070
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 88 deletions.
4 changes: 2 additions & 2 deletions test/hbcrypt_perf_base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void perf_base64_compare_buffer_sizes() {
perf::result_t result{
samples.calculate_result(data_to_encode.size())};
result.print(offset + 2, &warm_up_samples_result);
//result.print_frequency(offset + 2, &warm_up_samples_result);
result.print_frequency(offset + 2);
} catch (std::system_error const &ex) {
printf("aborted, error code = 0x%x, %s\n", ex.code().value(), ex.what());
}
Expand Down Expand Up @@ -117,7 +117,7 @@ void perf_base64_compare_buffer_sizes() {
perf::result_t result{
samples.calculate_result(data_to_encode.size())};
result.print(offset + 2, &warm_up_samples_result);
//result.print_frequency(offset + 2, &warm_up_samples_result);
result.print_frequency(offset + 2);
} catch (std::system_error const &ex) {
printf("aborted, error code = 0x%x, %s\n", ex.code().value(), ex.what());
}
Expand Down
2 changes: 1 addition & 1 deletion test/hbcrypt_perf_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void perf_hash_compare_buffer_sizes(wchar_t const *algorithm_name) {
});
perf::result_t result{samples.calculate_result(data_to_hash.size())};
result.print(offset + 2, &warm_up_samples_result);
result.print_frequency(offset + 2, &warm_up_samples_result);
result.print_frequency(offset + 2);
} catch (std::system_error const &ex) {
printf("aborted, error code = 0x%x, %s\n", ex.code().value(), ex.what());
}
Expand Down
50 changes: 25 additions & 25 deletions test/hcrypt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,55 +29,55 @@

int main() {
try {
//test_CTAD();
test_CTAD();

//test_err();
test_err();

//test_base64();
test_base64();

//print_is_fips_complience_on();
print_is_fips_complience_on();

//print_registered_providers();
print_registered_providers();

//resolve_providers();
resolve_providers();

//print_algorithms();
print_algorithms();

//print_crypto_contexts();
print_crypto_contexts();

//test_algorithm();
test_algorithm();

//test_rand();
test_rand();

//test_sample_key_derivation();
test_sample_key_derivation();

//test_sample_hash();
test_sample_hash();

//test_message_signing();
test_message_signing();

//tesh_dh_oakley();
tesh_dh_oakley();

//test_sha1_hmac();
test_sha1_hmac();

//test_aes_cmac();
test_aes_cmac();

//test_aes_cbc();
test_aes_cbc();

//test_ncrypt_providers();
test_ncrypt_providers();

//test_ncrypt_enum_keys();
test_ncrypt_enum_keys();

//test_ecdsa();
test_ecdsa();

//test_sample_ncrypt_key_derivation();
test_sample_ncrypt_key_derivation();

//perf_compare_hash();
perf_compare_hash();

//perf_hash_compare_buffer_sizes(BCRYPT_MD5_ALGORITHM);
perf_hash_compare_buffer_sizes(BCRYPT_MD5_ALGORITHM);

//perf_hash_compare_buffer_sizes(BCRYPT_SHA1_ALGORITHM);
perf_hash_compare_buffer_sizes(BCRYPT_SHA1_ALGORITHM);

//perf_hash_compare_buffer_sizes(BCRYPT_SHA256_ALGORITHM);
perf_hash_compare_buffer_sizes(BCRYPT_SHA256_ALGORITHM);

perf_base64_compare_buffer_sizes();

Expand Down
Loading

0 comments on commit 5279070

Please sign in to comment.