blob: 1d0a3f37d3714be2e69be6caffaf7033862e8d43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <iostream>
#include <string>
using std::string;
using std::cout;
using std::hex;
#include "crypto_hash_sha512.h"
int main()
{
string x = "testing\n";
string h = crypto_hash_sha512(x);
for (int i = 0;i < h.size();++i) {
cout << hex << (15 & (int) (h[i] >> 4));
cout << hex << (15 & (int) h[i]);
}
cout << "\n";
return 0;
}
|