toxcore/nacl/tests/hash4.cpp

19 lines
352 B
C++
Raw Normal View History

2013-07-02 21:53:34 +08:00
#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;
}