bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
interactive_hasher.cpp
1#include <iostream>
2#include "../picosha2.h"
3
4int main(int argc, char* argv[])
5{
6 std::cout << "Input freely. To get hash, input \"hash!\". " << std::endl;
8 while(true){
9 hasher.init(); //reset hasher state
10 while(true){
11 std::string line;
12 std::getline(std::cin, line);
13 if(line == "hash!"){
14 break;
15 }
16 hasher.process(line.begin(), line.end());
17 }
18 hasher.finish();
19 std::string hex_str;
20 picosha2::get_hash_hex_string(hasher, hex_str);
21 std::cout << hex_str << std::endl;
22 }
23
24 return 0;
25}
26