1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 10:37:24 -07:00

Wrap crypto_shorthash macros

This commit is contained in:
Frank Denis 2013-04-21 17:36:53 +02:00
parent 6dd19c1665
commit d689a92c17
2 changed files with 29 additions and 4 deletions

View File

@ -1,6 +1,24 @@
#include "crypto_shorthash.h"
size_t
crypto_shorthash_bytes(void)
{
return crypto_shorthash_BYTES;
}
size_t
crypto_shorthash_keybytes(void)
{
return crypto_shorthash_KEYBYTES;
}
const char *
crypto_shorthash_primitive(void)
{
return crypto_shorthash_PRIMITIVE;
}
int
crypto_shorthash(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k)

View File

@ -1,16 +1,23 @@
#ifndef crypto_shorthash_H
#define crypto_shorthash_H
#include "crypto_shorthash_siphash24.h"
#include <stdlib.h>
#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES
#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES
#define crypto_shorthash_PRIMITIVE "siphash24"
#include "crypto_shorthash_siphash24.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES
size_t crypto_shorthash_bytes(void);
#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES
size_t crypto_shorthash_keybytes(void);
#define crypto_shorthash_PRIMITIVE "siphash24"
const char *crypto_shorthash_primitive(void);
int crypto_shorthash(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);