Keep ming Visual C++ happy
This commit is contained in:
parent
de517b70d9
commit
47de75e935
@ -5,14 +5,14 @@
|
||||
|
||||
/* "Test Case 2" from RFC 4231 */
|
||||
unsigned char key[32] = "Jefe";
|
||||
unsigned char c[28] = "what do ya want for nothing?";
|
||||
unsigned char c[] = "what do ya want for nothing?";
|
||||
|
||||
unsigned char a[32];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
crypto_auth_hmacsha512256(a,c,sizeof c,key);
|
||||
crypto_auth_hmacsha512256(a,c,sizeof c - 1U,key);
|
||||
for (i = 0;i < 32;++i) {
|
||||
printf(",0x%02x",(unsigned int) a[i]);
|
||||
if (i % 8 == 7) printf("\n");
|
||||
|
@ -3,13 +3,13 @@
|
||||
#define TEST_NAME "hash"
|
||||
#include "cmptest.h"
|
||||
|
||||
unsigned char x[8] = "testing\n";
|
||||
unsigned char x[] = "testing\n";
|
||||
unsigned char h[crypto_hash_BYTES];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
crypto_hash(h,x,sizeof x);
|
||||
crypto_hash(h,x,sizeof x - 1U);
|
||||
for (i = 0;i < crypto_hash_BYTES;++i) printf("%02x",(unsigned int) h[i]);
|
||||
printf("\n");
|
||||
return 0;
|
||||
|
@ -3,13 +3,13 @@
|
||||
#define TEST_NAME "hash3"
|
||||
#include "cmptest.h"
|
||||
|
||||
unsigned char x[8] = "testing\n";
|
||||
unsigned char x[] = "testing\n";
|
||||
unsigned char h[crypto_hash_sha512_BYTES];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
crypto_hash_sha512(h,x,sizeof x);
|
||||
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");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user