summaryrefslogtreecommitdiff
path: root/nacl/crypto_auth/wrapper-verify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/crypto_auth/wrapper-verify.cpp')
-rw-r--r--nacl/crypto_auth/wrapper-verify.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/nacl/crypto_auth/wrapper-verify.cpp b/nacl/crypto_auth/wrapper-verify.cpp
deleted file mode 100644
index 57e25a26..00000000
--- a/nacl/crypto_auth/wrapper-verify.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
1#include <string>
2using std::string;
3#include "crypto_auth.h"
4
5void crypto_auth_verify(const string &a,const string &m,const string &k)
6{
7 if (k.size() != crypto_auth_KEYBYTES) throw "incorrect key length";
8 if (a.size() != crypto_auth_BYTES) throw "incorrect authenticator length";
9 if (crypto_auth_verify(
10 (const unsigned char *) a.c_str(),
11 (const unsigned char *) m.c_str(),m.size(),
12 (const unsigned char *) k.c_str()) == 0) return;
13 throw "invalid authenticator";
14}