diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-02 09:53:34 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-02 09:53:34 -0400 |
commit | e2967396ac73cb7410787886cdaf072a184ffc49 (patch) | |
tree | 527a74d25a4a0705fc641994fd35bfab22662034 /nacl/crypto_hash/wrapper-hash.cpp | |
parent | 8928c817df345f29aa0b194743595aa11bd6a8ba (diff) |
Added NaCl crypto library.
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 | } | ||