crypto_hash compat

This commit is contained in:
Frank Denis
2013-04-22 22:49:53 -07:00
parent db8e3dc472
commit 03120406e3
2 changed files with 20 additions and 0 deletions
@@ -16,6 +16,8 @@ SODIUM_EXPORT
int crypto_hash(unsigned char *out, const unsigned char *in,
unsigned long long inlen);
#define crypto_hash_sha512 crypto_hash
#ifdef __cplusplus
}
#endif
+18
View File
@@ -2,6 +2,8 @@
#include "crypto_auth_hmacsha256.h"
#include "crypto_auth_hmacsha512256.h"
#include "crypto_box_curve25519xsalsa20poly1305.h"
#include "crypto_hash_sha256.h"
#include "crypto_hash_sha512.h"
#include "crypto_scalarmult_curve25519.h"
#include "crypto_secretbox_xsalsa20poly1305.h"
#include "export.h"
@@ -10,6 +12,22 @@
extern "C" {
#endif
#undef crypto_hash_sha256_ref
SODIUM_EXPORT int
crypto_hash_sha256_ref(unsigned char *out, const unsigned char *in,
unsigned long long inlen)
{
return crypto_hash_sha256(out, in, inlen);
}
#undef crypto_hash_sha512_ref
SODIUM_EXPORT int
crypto_hash_sha512_ref(unsigned char *out, const unsigned char *in,
unsigned long long inlen)
{
return crypto_hash_sha512(out, in, inlen);
}
#undef crypto_auth_hmacsha256_ref
SODIUM_EXPORT int
crypto_auth_hmacsha256_ref(unsigned char *out, const unsigned char *in,