Tests: use size_t for sizes, not int.
Remove unused variables by the way.
This commit is contained in:
parent
e1a0faee7f
commit
0afc36c827
@ -12,7 +12,6 @@ unsigned char a[32];
|
||||
int main(void)
|
||||
{
|
||||
int clen;
|
||||
int i;
|
||||
for (clen = 0;clen < 10000;++clen) {
|
||||
randombytes(key,sizeof key);
|
||||
randombytes(c,clen);
|
||||
|
@ -14,8 +14,8 @@ unsigned char m2[10000];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int mlen;
|
||||
int i;
|
||||
size_t mlen;
|
||||
size_t i;
|
||||
|
||||
for (mlen = 0;mlen < 1000 && mlen + crypto_box_ZEROBYTES < sizeof m;++mlen) {
|
||||
crypto_box_keypair(alicepk,alicesk);
|
||||
|
@ -16,8 +16,8 @@ unsigned char m2[10000];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int mlen;
|
||||
int i;
|
||||
size_t mlen;
|
||||
size_t i;
|
||||
int caught;
|
||||
|
||||
for (mlen = 0;mlen < 1000 && mlen + crypto_box_ZEROBYTES < sizeof m;++mlen) {
|
||||
|
@ -9,7 +9,7 @@ int main(void)
|
||||
{
|
||||
#define MAXLEN 64
|
||||
crypto_uint8 in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
|
||||
int h,i,j;
|
||||
size_t h,i,j;
|
||||
|
||||
for(h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h;
|
||||
|
||||
|
@ -12,7 +12,6 @@ unsigned char a[16];
|
||||
int main(void)
|
||||
{
|
||||
int clen;
|
||||
int i;
|
||||
for (clen = 0;clen < 10000;++clen) {
|
||||
randombytes(key,sizeof key);
|
||||
randombytes(c,clen);
|
||||
|
@ -11,8 +11,8 @@ unsigned char m2[10000];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int mlen;
|
||||
int i;
|
||||
size_t mlen;
|
||||
size_t i;
|
||||
|
||||
for (mlen = 0;mlen < 1000 && mlen + crypto_secretbox_ZEROBYTES < sizeof m;++mlen) {
|
||||
randombytes(k,crypto_secretbox_KEYBYTES);
|
||||
|
@ -13,8 +13,8 @@ unsigned char m2[10000];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int mlen;
|
||||
int i;
|
||||
size_t mlen;
|
||||
size_t i;
|
||||
int caught;
|
||||
|
||||
for (mlen = 0;mlen < 1000 && mlen + crypto_secretbox_ZEROBYTES < sizeof m;++mlen) {
|
||||
|
Loading…
Reference in New Issue
Block a user