mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Tests: no need for crypto_uint8
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
#define TEST_NAME "generichash"
|
||||
#include "cmptest.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#define MAXLEN 64
|
||||
crypto_uint8 in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
|
||||
unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
|
||||
size_t h,i,j;
|
||||
|
||||
for(h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
#define TEST_NAME "generichash2"
|
||||
#include "cmptest.h"
|
||||
|
||||
@@ -8,7 +6,7 @@ int main(void)
|
||||
{
|
||||
#define MAXLEN 64
|
||||
crypto_generichash_state st;
|
||||
crypto_uint8 in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
|
||||
unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
|
||||
size_t h,i,j;
|
||||
|
||||
for(h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
#define TEST_NAME "generichash3"
|
||||
#include "cmptest.h"
|
||||
|
||||
@@ -8,13 +6,13 @@ int main(void)
|
||||
{
|
||||
#define MAXLEN 64
|
||||
crypto_generichash_blake2b_state st;
|
||||
crypto_uint8 salt[crypto_generichash_blake2b_SALTBYTES] = {
|
||||
unsigned char salt[crypto_generichash_blake2b_SALTBYTES] = {
|
||||
'5', 'b', '6', 'b', '4', '1', 'e', 'd', '9', 'b', '3', '4', '3', 'f', 'e', '0'
|
||||
};
|
||||
crypto_uint8 personal[crypto_generichash_blake2b_PERSONALBYTES] = {
|
||||
unsigned char personal[crypto_generichash_blake2b_PERSONALBYTES] = {
|
||||
'5', '1', '2', '6', 'f', 'b', '2', 'a', '3', '7', '4', '0', '0', 'd', '2', 'a'
|
||||
};
|
||||
crypto_uint8 in[MAXLEN], out[crypto_generichash_blake2b_BYTES_MAX], k[crypto_generichash_blake2b_KEYBYTES_MAX];
|
||||
unsigned char in[MAXLEN], out[crypto_generichash_blake2b_BYTES_MAX], k[crypto_generichash_blake2b_KEYBYTES_MAX];
|
||||
size_t h,i,j;
|
||||
|
||||
for(h = 0; h < crypto_generichash_blake2b_KEYBYTES_MAX; ++h) k[h] = h;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
|
||||
#include "crypto_uint8.h"
|
||||
|
||||
#define TEST_NAME "shorthash"
|
||||
#include "cmptest.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#define MAXLEN 64
|
||||
crypto_uint8 in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES];
|
||||
unsigned char in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES];
|
||||
size_t i,j;
|
||||
|
||||
for( i = 0; i < crypto_shorthash_KEYBYTES; ++i ) k[i] = i;
|
||||
|
||||
Reference in New Issue
Block a user