1
0

hash2.cpp 338 B

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