wrapper-hash.cpp 240 B

12345678910
  1. #include <string>
  2. using std::string;
  3. #include "crypto_hash.h"
  4. string crypto_hash(const string &m)
  5. {
  6. unsigned char h[crypto_hash_BYTES];
  7. crypto_hash(h,(const unsigned char *) m.c_str(),m.size());
  8. return string((char *) h,sizeof h);
  9. }