mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-28 22:21:15 -07:00
More api.h removal
This commit is contained in:
parent
e33a505823
commit
3a4cdb9c3d
@ -28,7 +28,6 @@ libsodium_la_SOURCES = \
|
||||
crypto_core/salsa20/core_salsa20_api.c \
|
||||
crypto_generichash/crypto_generichash.c \
|
||||
crypto_generichash/blake2/generichash_blake2_api.c \
|
||||
crypto_generichash/blake2/ref/api.h \
|
||||
crypto_generichash/blake2/ref/blake2-impl.h \
|
||||
crypto_generichash/blake2/ref/blake2.h \
|
||||
crypto_generichash/blake2/ref/blake2b-compress-ref.c \
|
||||
@ -63,11 +62,9 @@ libsodium_la_SOURCES = \
|
||||
crypto_secretbox/crypto_secretbox.c \
|
||||
crypto_secretbox/crypto_secretbox_easy.c \
|
||||
crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c \
|
||||
crypto_secretbox/xsalsa20poly1305/ref/api.h \
|
||||
crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \
|
||||
crypto_shorthash/crypto_shorthash.c \
|
||||
crypto_shorthash/siphash24/shorthash_siphash24_api.c \
|
||||
crypto_shorthash/siphash24/ref/api.h \
|
||||
crypto_shorthash/siphash24/ref/shorthash_siphash24.c \
|
||||
crypto_sign/crypto_sign.c \
|
||||
crypto_sign/ed25519/ref10/base.h \
|
||||
|
@ -1,2 +0,0 @@
|
||||
|
||||
#include "crypto_generichash_blake2b.h"
|
@ -3,7 +3,7 @@
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "api.h"
|
||||
#include "crypto_generichash_blake2b.h"
|
||||
#include "blake2.h"
|
||||
|
||||
int
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
#include "crypto_secretbox_xsalsa20poly1305.h"
|
||||
|
||||
#define crypto_secretbox crypto_secretbox_xsalsa20poly1305
|
||||
#define crypto_secretbox_open crypto_secretbox_xsalsa20poly1305_open
|
||||
#define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES
|
||||
#define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES
|
||||
#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
|
||||
#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
|
||||
#define crypto_secretbox_IMPLEMENTATION crypto_secretbox_xsalsa20poly1305_IMPLEMENTATION
|
||||
#define crypto_secretbox_VERSION crypto_secretbox_xsalsa20poly1305_VERSION
|
@ -1,8 +1,8 @@
|
||||
#include "api.h"
|
||||
#include "crypto_onetimeauth_poly1305.h"
|
||||
#include "crypto_secretbox_xsalsa20poly1305.h"
|
||||
#include "crypto_stream_xsalsa20.h"
|
||||
|
||||
int crypto_secretbox(
|
||||
int crypto_secretbox_xsalsa20poly1305(
|
||||
unsigned char *c,
|
||||
const unsigned char *m,unsigned long long mlen,
|
||||
const unsigned char *n,
|
||||
@ -17,7 +17,7 @@ int crypto_secretbox(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int crypto_secretbox_open(
|
||||
int crypto_secretbox_xsalsa20poly1305_open(
|
||||
unsigned char *m,
|
||||
const unsigned char *c,unsigned long long clen,
|
||||
const unsigned char *n,
|
||||
|
@ -1,7 +0,0 @@
|
||||
|
||||
#include "crypto_shorthash_siphash24.h"
|
||||
|
||||
#define crypto_shorthash crypto_shorthash_siphash24
|
||||
#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES
|
||||
#define crypto_shorthash_IMPLEMENTATION crypto_shorthash_siphash24_IMPLEMENTATION
|
||||
#define crypto_shorthash_VERSION crypto_shorthash_siphash24_VERSION
|
@ -1,4 +1,4 @@
|
||||
#include "api.h"
|
||||
#include "crypto_shorthash_siphash24.h"
|
||||
#include "crypto_uint64.h"
|
||||
#include "crypto_uint32.h"
|
||||
#include "crypto_uint8.h"
|
||||
@ -35,7 +35,8 @@ typedef crypto_uint8 u8;
|
||||
v2 += v1; v1=ROTL(v1,17); v1 ^= v2; v2=ROTL(v2,32); \
|
||||
} while(0)
|
||||
|
||||
int crypto_shorthash(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
|
||||
int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen, const unsigned char *k)
|
||||
{
|
||||
/* "somepseudorandomlygeneratedbytes" */
|
||||
u64 v0 = 0x736f6d6570736575ULL;
|
||||
|
Loading…
Reference in New Issue
Block a user