-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Test namespace within CryptoPP namespace (Issue 379)
- Loading branch information
Showing
12 changed files
with
802 additions
and
780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
// bench.h - originally written and placed in the public domain by Wei Dai | ||
// CryptoPP::Test namespace added by JW in February 2017 | ||
|
||
#ifndef CRYPTOPP_BENCH_H | ||
#define CRYPTOPP_BENCH_H | ||
|
||
#include "cryptlib.h" | ||
|
||
extern const double CLOCK_TICKS_PER_SECOND; | ||
NAMESPACE_BEGIN(CryptoPP) | ||
NAMESPACE_BEGIN(Test) | ||
|
||
ANONYMOUS_NAMESPACE_BEGIN | ||
#ifdef CLOCKS_PER_SEC | ||
const double CLOCK_TICKS_PER_SECOND = (double)CLOCKS_PER_SEC; | ||
#elif defined(CLK_TCK) | ||
const double CLOCK_TICKS_PER_SECOND = (double)CLK_TCK; | ||
#else | ||
const double CLOCK_TICKS_PER_SECOND = 1000000.0; | ||
#endif | ||
|
||
static const byte defaultKey[] = "0123456789" // 168 + NULL | ||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | ||
"00000000000000000000000000000000000000000000000000000" | ||
"00000000000000000000000000000000000000000000000000000"; | ||
NAMESPACE_END | ||
|
||
void BenchmarkAll(double t, double hertz); | ||
void BenchmarkAll2(double t, double hertz); | ||
|
||
NAMESPACE_END // Test | ||
NAMESPACE_END // CryptoPP | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
73836e5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see Issue 379 and Test namespace within CryptoPP namespace on the mailing list.