From 099c678c30b9af218bedb35df2b4aab151499b15 Mon Sep 17 00:00:00 2001 From: Denis Evsyukov Date: Sat, 22 Feb 2020 20:03:26 +0300 Subject: [~] hash to function --- src/main.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index c5ffd45..cc1144f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,7 +2,6 @@ #include "functions.hpp" #include "opts/cxxopts.hpp" -#include "sha256/picosha2.h" using namespace std; @@ -38,12 +37,7 @@ int main(int argc, char *argv[]) { str += s + " "; } auto src_str = trim(str); - std::vector hash(picosha2::k_digest_size); - picosha2::hash256(src_str.begin(), src_str.end(), hash.begin(), hash.end()); - - std::string hex_str = - picosha2::bytes_to_hex_string(hash.begin(), hash.end()); - cout << "sha256('" << str << "'): " << hex_str << endl; + cout << "sha256('" << str << "'): " << sha256_hash(str) << endl; } std::string taskdir; if (result.count("taskdir")) { -- cgit v1.2.3