diff options
Diffstat (limited to 'nacl/crypto_hash/wrapper-hash.cpp')
-rw-r--r-- | nacl/crypto_hash/wrapper-hash.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nacl/crypto_hash/wrapper-hash.cpp b/nacl/crypto_hash/wrapper-hash.cpp new file mode 100644 index 00000000..4c0fb590 --- /dev/null +++ b/nacl/crypto_hash/wrapper-hash.cpp | |||
@@ -0,0 +1,10 @@ | |||
1 | #include <string> | ||
2 | using std::string; | ||
3 | #include "crypto_hash.h" | ||
4 | |||
5 | string crypto_hash(const string &m) | ||
6 | { | ||
7 | unsigned char h[crypto_hash_BYTES]; | ||
8 | crypto_hash(h,(const unsigned char *) m.c_str(),m.size()); | ||
9 | return string((char *) h,sizeof h); | ||
10 | } | ||