serval-dna/nacl/nacl-20110221/tests/hash2.cpp
Daniel O'Connor bf9710fd5a Unpacked nacl-20110221 after processing by nacl-prepare-sources.
This only affects build_android, if nacl-gcc-prep is run then build/`uname -s` will be created.
2012-02-27 12:40:14 +10:30

19 lines
338 B
C++

#include <iostream>
#include <string>
using std::string;
using std::cout;
using std::hex;
#include "crypto_hash.h"
int main()
{
string x = "testing\n";
string h = crypto_hash(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;
}