1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

sizes are unsigned.

This commit is contained in:
Frank Denis 2013-04-27 04:41:34 -07:00
parent 9a35ba5bfd
commit cfe3f24964
27 changed files with 67 additions and 67 deletions

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_auth_hmacsha256_BYTES 32
#define crypto_auth_hmacsha256_KEYBYTES 32
#define crypto_auth_hmacsha256_BYTES 32U
#define crypto_auth_hmacsha256_KEYBYTES 32U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_auth_hmacsha512256_BYTES 32
#define crypto_auth_hmacsha512256_KEYBYTES 32
#define crypto_auth_hmacsha512256_BYTES 32U
#define crypto_auth_hmacsha512256_KEYBYTES 32U
#ifdef __cplusplus
extern "C" {

View File

@ -3,12 +3,12 @@
#include "export.h"
#define crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES 32
#define crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES 32
#define crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES 32
#define crypto_box_curve25519xsalsa20poly1305_NONCEBYTES 24
#define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES 32
#define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES 16
#define crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES 32U
#define crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES 32U
#define crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES 32U
#define crypto_box_curve25519xsalsa20poly1305_NONCEBYTES 24U
#define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES 32U
#define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES 16U
#define crypto_box_curve25519xsalsa20poly1305_MACBYTES (crypto_box_curve25519xsalsa20poly1305_ZEROBYTES - crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES)
#ifdef __cplusplus

View File

@ -3,10 +3,10 @@
#include "export.h"
#define crypto_core_hsalsa20_OUTPUTBYTES 32
#define crypto_core_hsalsa20_INPUTBYTES 16
#define crypto_core_hsalsa20_KEYBYTES 32
#define crypto_core_hsalsa20_CONSTBYTES 16
#define crypto_core_hsalsa20_OUTPUTBYTES 32U
#define crypto_core_hsalsa20_INPUTBYTES 16U
#define crypto_core_hsalsa20_KEYBYTES 32U
#define crypto_core_hsalsa20_CONSTBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,10 +3,10 @@
#include "export.h"
#define crypto_core_salsa20_OUTPUTBYTES 64
#define crypto_core_salsa20_INPUTBYTES 16
#define crypto_core_salsa20_KEYBYTES 32
#define crypto_core_salsa20_CONSTBYTES 16
#define crypto_core_salsa20_OUTPUTBYTES 64U
#define crypto_core_salsa20_INPUTBYTES 16U
#define crypto_core_salsa20_KEYBYTES 32U
#define crypto_core_salsa20_CONSTBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,10 +3,10 @@
#include "export.h"
#define crypto_core_salsa2012_OUTPUTBYTES 64
#define crypto_core_salsa2012_INPUTBYTES 16
#define crypto_core_salsa2012_KEYBYTES 32
#define crypto_core_salsa2012_CONSTBYTES 16
#define crypto_core_salsa2012_OUTPUTBYTES 64U
#define crypto_core_salsa2012_INPUTBYTES 16U
#define crypto_core_salsa2012_KEYBYTES 32U
#define crypto_core_salsa2012_CONSTBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,10 +3,10 @@
#include "export.h"
#define crypto_core_salsa208_OUTPUTBYTES 64
#define crypto_core_salsa208_INPUTBYTES 16
#define crypto_core_salsa208_KEYBYTES 32
#define crypto_core_salsa208_CONSTBYTES 16
#define crypto_core_salsa208_OUTPUTBYTES 64U
#define crypto_core_salsa208_INPUTBYTES 16U
#define crypto_core_salsa208_KEYBYTES 32U
#define crypto_core_salsa208_CONSTBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_hash_sha256_BYTES 32
#define crypto_hash_sha256_BLOCKBYTES 64
#define crypto_hash_sha256_BYTES 32U
#define crypto_hash_sha256_BLOCKBYTES 64U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_hash_sha512_BYTES 64
#define crypto_hash_sha512_BLOCKBYTES 128
#define crypto_hash_sha512_BYTES 64U
#define crypto_hash_sha512_BLOCKBYTES 128U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_hashblocks_sha256_STATEBYTES 32
#define crypto_hashblocks_sha256_BLOCKBYTES 64
#define crypto_hashblocks_sha256_STATEBYTES 32U
#define crypto_hashblocks_sha256_BLOCKBYTES 64U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_hashblocks_sha512_STATEBYTES 64
#define crypto_hashblocks_sha512_BLOCKBYTES 128
#define crypto_hashblocks_sha512_STATEBYTES 64U
#define crypto_hashblocks_sha512_BLOCKBYTES 128U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_onetimeauth_poly1305_BYTES 16
#define crypto_onetimeauth_poly1305_KEYBYTES 32
#define crypto_onetimeauth_poly1305_BYTES 16U
#define crypto_onetimeauth_poly1305_KEYBYTES 32U
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -3,10 +3,10 @@
#include "export.h"
#define crypto_secretbox_xsalsa20poly1305_KEYBYTES 32
#define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24
#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES 32
#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16
#define crypto_secretbox_xsalsa20poly1305_KEYBYTES 32U
#define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24U
#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES 32U
#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,8 +3,8 @@
#include "export.h"
#define crypto_shorthash_siphash24_BYTES 8
#define crypto_shorthash_siphash24_KEYBYTES 16
#define crypto_shorthash_siphash24_BYTES 8U
#define crypto_shorthash_siphash24_KEYBYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,9 +3,9 @@
#include "export.h"
#define crypto_sign_ed25519_SECRETKEYBYTES 64
#define crypto_sign_ed25519_PUBLICKEYBYTES 32
#define crypto_sign_ed25519_BYTES 64
#define crypto_sign_ed25519_SECRETKEYBYTES 64U
#define crypto_sign_ed25519_PUBLICKEYBYTES 32U
#define crypto_sign_ed25519_BYTES 64U
#ifdef __cplusplus
extern "C" {

View File

@ -3,9 +3,9 @@
#include "export.h"
#define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES 64
#define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32
#define crypto_sign_edwards25519sha512batch_BYTES 64
#define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES 64U
#define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32U
#define crypto_sign_edwards25519sha512batch_BYTES 64U
#ifdef __cplusplus
extern "C" {

View File

@ -11,9 +11,9 @@
#include "export.h"
#define crypto_stream_aes128ctr_KEYBYTES 16
#define crypto_stream_aes128ctr_NONCEBYTES 16
#define crypto_stream_aes128ctr_BEFORENMBYTES 1408
#define crypto_stream_aes128ctr_KEYBYTES 16U
#define crypto_stream_aes128ctr_NONCEBYTES 16U
#define crypto_stream_aes128ctr_BEFORENMBYTES 1408U
#ifdef __cplusplus
extern "C" {

View File

@ -12,9 +12,9 @@
#include "export.h"
#define crypto_stream_aes256estream_KEYBYTES 32
#define crypto_stream_aes256estream_NONCEBYTES 16
#define crypto_stream_aes256estream_BEFORENMBYTES 276
#define crypto_stream_aes256estream_KEYBYTES 32U
#define crypto_stream_aes256estream_NONCEBYTES 16U
#define crypto_stream_aes256estream_BEFORENMBYTES 276U
#ifdef __cplusplus
extern "C" {

View File

@ -11,8 +11,8 @@
#include "export.h"
#define crypto_stream_salsa20_KEYBYTES 32
#define crypto_stream_salsa20_NONCEBYTES 8
#define crypto_stream_salsa20_KEYBYTES 32U
#define crypto_stream_salsa20_NONCEBYTES 8U
#ifdef __cplusplus
extern "C" {

View File

@ -11,8 +11,8 @@
#include "export.h"
#define crypto_stream_salsa2012_KEYBYTES 32
#define crypto_stream_salsa2012_NONCEBYTES 8
#define crypto_stream_salsa2012_KEYBYTES 32U
#define crypto_stream_salsa2012_NONCEBYTES 8U
#ifdef __cplusplus
extern "C" {

View File

@ -11,8 +11,8 @@
#include "export.h"
#define crypto_stream_salsa208_KEYBYTES 32
#define crypto_stream_salsa208_NONCEBYTES 8
#define crypto_stream_salsa208_KEYBYTES 32U
#define crypto_stream_salsa208_NONCEBYTES 8U
#ifdef __cplusplus
extern "C" {

View File

@ -11,8 +11,8 @@
#include "export.h"
#define crypto_stream_xsalsa20_KEYBYTES 32
#define crypto_stream_xsalsa20_NONCEBYTES 24
#define crypto_stream_xsalsa20_KEYBYTES 32U
#define crypto_stream_xsalsa20_NONCEBYTES 24U
#ifdef __cplusplus
extern "C" {

View File

@ -3,7 +3,7 @@
#include "export.h"
#define crypto_verify_16_BYTES 16
#define crypto_verify_16_BYTES 16U
#ifdef __cplusplus
extern "C" {

View File

@ -3,7 +3,7 @@
#include "export.h"
#define crypto_verify_32_BYTES 32
#define crypto_verify_32_BYTES 32U
#ifdef __cplusplus
extern "C" {

View File

@ -8,7 +8,7 @@ unsigned char h[crypto_hash_BYTES];
int main(void)
{
int i;
size_t i;
crypto_hash(h,x,sizeof x - 1U);
for (i = 0;i < crypto_hash_BYTES;++i) printf("%02x",(unsigned int) h[i]);
printf("\n");

View File

@ -8,7 +8,7 @@ unsigned char h[crypto_hash_sha512_BYTES];
int main(void)
{
int i;
size_t i;
crypto_hash_sha512(h,x,sizeof x - 1U);
for (i = 0;i < crypto_hash_sha512_BYTES;++i) printf("%02x",(unsigned int) h[i]);
printf("\n");

View File

@ -9,7 +9,7 @@ int main(void)
{
#define MAXLEN 64
crypto_uint8 in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES];
int i,j;
size_t i,j;
for( i = 0; i < crypto_shorthash_KEYBYTES; ++i ) k[i] = i;