Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,27 @@ The test program supports options as follows:
-p - port number to use
-t - terse output
```

## evp_hash

Tool that computes hashes using the specified algorithm.
Runs for 5 seconds and prints the average execution time per hash.
Prints out the average time per hash computation.
Three modes of operation:
- deprecated: Use deprecated, legacy API's to do hash (e.g. SHA1_Init)
- evp_isolated: Use EVP API and don't allow shared data between threads
- evp_shared (default): Use EVP API and allow shared data between threads

```
Usage: evp_hash [-h] [-t] [-o operation] [-u update-times] [-a algorithm] thread-count
-h - print this help output
-t - terse output
-o operation - mode of operation. One of [deprecated, evp_isolated, evp_shared] (default: evp_shared)
-u update-times - times to update digest. 1 for one-shot (default: 1)
-a algorithm - One of: [SHA1, SHA224, SHA256, SHA384, SHA512] (default: SHA1)
thread-count - number of threads
```

```sh
evp_hash -u 10 -a SHA512 -o evp_isolated 15
```
3 changes: 3 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,6 @@ target_link_libraries(evp_setpeer PRIVATE perf)

add_executable(writeread writeread.c)
target_link_libraries(writeread PRIVATE perf)

add_executable(evp_hash evp_hash.c)
target_link_libraries(evp_hash PRIVATE perf)
Loading