aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEvsyukov Denis Anatolyevich <[email protected]>2020-01-09 15:28:07 +0300
committerEvsyukov Denis Anatolyevich <[email protected]>2020-01-09 15:28:07 +0300
commitdf81d3d62297a4f0cffbf8ff4acc368ee2896b9a (patch)
tree55a795b4df8659aa5e9937988456a4ea16d9e687 /src/main.cpp
parentFirst commit (diff)
downloadt-df81d3d62297a4f0cffbf8ff4acc368ee2896b9a.tar.xz
t-df81d3d62297a4f0cffbf8ff4acc368ee2896b9a.zip
Added sha256 functions
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index be82bf1..b5f6099 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4,6 +4,7 @@
#include "cxxopts.hpp"
#include "functions.hpp"
+#include "sha256/sha256.h"
using namespace std;
@@ -34,13 +35,14 @@ int main(int argc, char *argv[]) {
exit(0);
}
if (result.count("positional")) {
- std::cout << "Positional = {" << std::endl;
std::string str;
auto &v = result["positional"].as<std::vector<std::string>>();
for (const auto &s : v) {
str += s + " ";
}
- std::cout << "\"" << trim(str) << "\"" << std::endl << "}" << std::endl;
+ str = trim(str);
+
+ cout << "sha256('" << str << "'): " << sha256(str) << endl;
}
std::string taskdir;
if (result.count("taskdir")) {