mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Add missing extern "C"
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "api.h"
|
||||
#include "crypto_onetimeauth_poly1305_53.h"
|
||||
#include "crypto_verify_16.h"
|
||||
|
||||
int crypto_onetimeauth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "api.h"
|
||||
#include "crypto_onetimeauth_poly1305_ref.h"
|
||||
#include "crypto_verify_16.h"
|
||||
|
||||
int crypto_onetimeauth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
#ifndef __SODIUM_CORE_H__
|
||||
#define __SODIUM_CORE_H__
|
||||
|
||||
int sodium_init(void);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int sodium_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
|
||||
#define crypto_auth_hmacsha256_BYTES 32
|
||||
#define crypto_auth_hmacsha256_KEYBYTES 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_auth_hmacsha256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_auth_hmacsha256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
int crypto_auth_hmacsha256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_auth_hmacsha256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
|
||||
#define crypto_auth_hmacsha512256_BYTES 32
|
||||
#define crypto_auth_hmacsha512256_KEYBYTES 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_auth_hmacsha512256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_auth_hmacsha512256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
int crypto_auth_hmacsha512256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_auth_hmacsha512256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
#define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES 32
|
||||
#define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES 16
|
||||
#define crypto_box_curve25519xsalsa20poly1305_MACBYTES (crypto_box_curve25519xsalsa20poly1305_ZEROBYTES - crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref_keypair(unsigned char *,unsigned char *);
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref_beforenm(unsigned char *,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref_keypair(unsigned char *,unsigned char *);
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref_beforenm(unsigned char *,const unsigned char *,const unsigned char *);
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#define crypto_core_hsalsa20_INPUTBYTES 16
|
||||
#define crypto_core_hsalsa20_KEYBYTES 32
|
||||
#define crypto_core_hsalsa20_CONSTBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_core_hsalsa20_ref2(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_core_hsalsa20_ref2(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#define crypto_core_salsa20_INPUTBYTES 16
|
||||
#define crypto_core_salsa20_KEYBYTES 32
|
||||
#define crypto_core_salsa20_CONSTBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_core_salsa20_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_core_salsa20_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#define crypto_core_salsa2012_INPUTBYTES 16
|
||||
#define crypto_core_salsa2012_KEYBYTES 32
|
||||
#define crypto_core_salsa2012_CONSTBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_core_salsa2012_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_core_salsa2012_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#define crypto_core_salsa208_INPUTBYTES 16
|
||||
#define crypto_core_salsa208_KEYBYTES 32
|
||||
#define crypto_core_salsa208_CONSTBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_core_salsa208_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_core_salsa208_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX
|
||||
#define crypto_generichash_PRIMITIVE "blake2b"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef crypto_generichash_blake2b_state crypto_generichash_state;
|
||||
|
||||
int crypto_generichash(unsigned char *out, size_t outlen,
|
||||
@@ -26,4 +30,8 @@ int crypto_generichash_update(crypto_generichash_blake2b_state *state,
|
||||
int crypto_generichash_final(crypto_generichash_blake2b_state *state,
|
||||
unsigned char *out, const size_t outlen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
# define CRYPTO_ALIGN(x) __attribute__((aligned(x)))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 1)
|
||||
CRYPTO_ALIGN(64) typedef struct {
|
||||
uint64_t h[8];
|
||||
@@ -27,9 +31,6 @@ CRYPTO_ALIGN(64) typedef struct {
|
||||
} crypto_generichash_blake2b_state;
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int crypto_generichash_blake2b_ref(unsigned char *out, size_t outlen,
|
||||
const unsigned char *in,
|
||||
unsigned long long inlen,
|
||||
|
||||
@@ -6,7 +6,15 @@
|
||||
#define crypto_hash_BYTES crypto_hash_sha512_BYTES
|
||||
#define crypto_hash_PRIMITIVE "sha512"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_hash(unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
#define crypto_hash_sha256_H
|
||||
|
||||
#define crypto_hash_sha256_BYTES 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_hash_sha256_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
int crypto_hash_sha256_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
#define crypto_hash_sha512_H
|
||||
|
||||
#define crypto_hash_sha512_BYTES 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_hash_sha512_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
int crypto_hash_sha512_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
|
||||
#define crypto_hashblocks_sha256_STATEBYTES 32
|
||||
#define crypto_hashblocks_sha256_BLOCKBYTES 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_hashblocks_sha256_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
int crypto_hashblocks_sha256_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
|
||||
#define crypto_hashblocks_sha512_STATEBYTES 64
|
||||
#define crypto_hashblocks_sha512_BLOCKBYTES 128
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_hashblocks_sha512_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
int crypto_hashblocks_sha512_ref(unsigned char *,const unsigned char *,unsigned long long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7,9 +7,17 @@
|
||||
#define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES
|
||||
#define crypto_scalarmult_PRIMITIVE "curve25519"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_scalarmult_base(unsigned char *q, const unsigned char *n);
|
||||
|
||||
int crypto_scalarmult(unsigned char *q, const unsigned char *n,
|
||||
const unsigned char *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
|
||||
#define crypto_secretbox_PRIMITIVE "xsalsa20poly1305"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_secretbox(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
@@ -17,4 +21,8 @@ int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
|
||||
unsigned long long clen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
#define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24
|
||||
#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES 32
|
||||
#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_secretbox_xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_secretbox_xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_secretbox_xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_secretbox_xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,15 @@
|
||||
#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES
|
||||
#define crypto_shorthash_PRIMITIVE "siphash24"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_shorthash(unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen, const unsigned char *k);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
|
||||
#define crypto_shorthash_siphash24_BYTES 8
|
||||
#define crypto_shorthash_siphash24_KEYBYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_shorthash_siphash24_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
int crypto_shorthash_siphash24_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
#define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES
|
||||
#define crypto_sign_PRIMITIVE "ed25519"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk,
|
||||
const unsigned char *seed);
|
||||
|
||||
@@ -21,4 +25,8 @@ int crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
||||
const unsigned char *sm, unsigned long long smlen,
|
||||
const unsigned char *pk);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_sign_ed25519_ref10(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_sign_ed25519_ref10_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_sign_ed25519_ref10_keypair(unsigned char *,unsigned char *);
|
||||
extern int crypto_sign_ed25519_ref10_seed_keypair(unsigned char *,unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_sign_ed25519_ref10(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_sign_ed25519_ref10_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_sign_ed25519_ref10_keypair(unsigned char *,unsigned char *);
|
||||
int crypto_sign_ed25519_ref10_seed_keypair(unsigned char *,unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
#define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES 64
|
||||
#define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32
|
||||
#define crypto_sign_edwards25519sha512batch_BYTES 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_sign_edwards25519sha512batch_ref(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_sign_edwards25519sha512batch_ref_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
extern int crypto_sign_edwards25519sha512batch_ref_keypair(unsigned char *,unsigned char *);
|
||||
|
||||
int crypto_sign_edwards25519sha512batch_ref(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_sign_edwards25519sha512batch_ref_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
|
||||
int crypto_sign_edwards25519sha512batch_ref_keypair(unsigned char *,unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
|
||||
#define crypto_stream_PRIMITIVE "xsalsa20"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int crypto_stream(unsigned char *c, unsigned long long clen,
|
||||
const unsigned char *n, const unsigned char *k);
|
||||
|
||||
|
||||
int crypto_stream_xor(unsigned char *c, const unsigned char *m,
|
||||
unsigned long long mlen, const unsigned char *n,
|
||||
const unsigned char *k);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,14 +4,17 @@
|
||||
#define crypto_stream_aes128ctr_KEYBYTES 16
|
||||
#define crypto_stream_aes128ctr_NONCEBYTES 16
|
||||
#define crypto_stream_aes128ctr_BEFORENMBYTES 1408
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_stream_aes128ctr_portable(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_aes128ctr_portable_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_aes128ctr_portable_beforenm(unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_aes128ctr_portable_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_aes128ctr_portable_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_stream_aes128ctr_portable(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_aes128ctr_portable_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_aes128ctr_portable_beforenm(unsigned char *,const unsigned char *);
|
||||
int crypto_stream_aes128ctr_portable_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_aes128ctr_portable_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
#define crypto_stream_salsa20_KEYBYTES 32
|
||||
#define crypto_stream_salsa20_NONCEBYTES 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_stream_salsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa20_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_stream_salsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa20_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
#define crypto_stream_salsa2012_KEYBYTES 32
|
||||
#define crypto_stream_salsa2012_NONCEBYTES 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_stream_salsa2012_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa2012_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa2012_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa2012_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa2012_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_stream_salsa2012_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa2012_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa2012_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa2012_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa2012_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
#define crypto_stream_salsa208_KEYBYTES 32
|
||||
#define crypto_stream_salsa208_NONCEBYTES 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_stream_salsa208_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa208_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa208_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa208_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_salsa208_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_stream_salsa208_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa208_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa208_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa208_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_salsa208_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
|
||||
#define crypto_stream_xsalsa20_KEYBYTES 32
|
||||
#define crypto_stream_xsalsa20_NONCEBYTES 24
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int crypto_stream_xsalsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_xsalsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_xsalsa20_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_xsalsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
extern int crypto_stream_xsalsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
int crypto_stream_xsalsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_xsalsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_xsalsa20_ref_beforenm(unsigned char *,const unsigned char *);
|
||||
int crypto_stream_xsalsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
int crypto_stream_xsalsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
#define crypto_verify_16_H
|
||||
|
||||
#define crypto_verify_16_BYTES 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif
|
||||
int crypto_verify_16(const unsigned char *x, const unsigned char *y);
|
||||
#define crypto_verify_16_ref crypto_verify_16
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
#define crypto_verify_32_H
|
||||
|
||||
#define crypto_verify_32_BYTES 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int crypto_verify_32(const unsigned char *x, const unsigned char *y);
|
||||
#define crypto_verify_32_ref crypto_verify_32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
#ifndef randombytes_H
|
||||
#define randombytes_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct randombytes_implementation {
|
||||
const char *(*implementation_name)(void);
|
||||
uint32_t (*random)(void);
|
||||
|
||||
Reference in New Issue
Block a user