summaryrefslogtreecommitdiff
path: root/nacl/tests/hash4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/tests/hash4.cpp')
-rw-r--r--nacl/tests/hash4.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/nacl/tests/hash4.cpp b/nacl/tests/hash4.cpp
new file mode 100644
index 00000000..1d0a3f37
--- /dev/null
+++ b/nacl/tests/hash4.cpp
@@ -0,0 +1,18 @@
1#include <iostream>
2#include <string>
3using std::string;
4using std::cout;
5using std::hex;
6#include "crypto_hash_sha512.h"
7
8int main()
9{
10 string x = "testing\n";
11 string h = crypto_hash_sha512(x);
12 for (int i = 0;i < h.size();++i) {
13 cout << hex << (15 & (int) (h[i] >> 4));
14 cout << hex << (15 & (int) h[i]);
15 }
16 cout << "\n";
17 return 0;
18}