aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDenis Evsyukov <[email protected]>2020-02-22 20:03:26 +0300
committerDenis Evsyukov <[email protected]>2020-02-22 20:03:26 +0300
commit099c678c30b9af218bedb35df2b4aab151499b15 (patch)
tree8d2d4c74a8b1deeac9c7b975793ec12160ad95ff /src/main.cpp
parent[~] sha1 to sha256 (diff)
downloadt-099c678c30b9af218bedb35df2b4aab151499b15.tar.xz
t-099c678c30b9af218bedb35df2b4aab151499b15.zip
[~] hash to function
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 1 insertions, 7 deletions
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<unsigned char> 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")) {