aboutsummaryrefslogtreecommitdiffstats
path: root/vcpkg_installed/vcpkg/blds/picosha2/src/v1.0.1-8b81a1a146.clean/example/hasher.cpp
blob: 4903069b06124034e62b928bdee6295ab4ba7760 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include "../picosha2.h"

void CalcAndOutput(const std::string& src){
	std::cout << "src : \"" << src << "\"\n";
	std::cout << "hash: " << picosha2::hash256_hex_string(src) << "\n" << std::endl;
}

int main(int argc, char* argv[])
{
	if(argc == 1){
		CalcAndOutput("");
	}
	else{
		for(int i = 1; i < argc; ++i){
			CalcAndOutput(argv[i]);
		}
	}

    return 0;
}