mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-28 22:21:15 -07:00
Wrap crypto_shorthash macros
This commit is contained in:
parent
6dd19c1665
commit
d689a92c17
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user