repo.or.cz
/
tomato.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git]
/
release
/
src
/
router
/
libsodium
/
test
/
default
/
hash.c
blob
c24f9c4972510c43930db66e35e20983b6b435ad
1
#include <stdio.h>
2
3
#define TEST_NAME
"hash"
4
#include
"cmptest.h"
5
6
unsigned char
x
[] =
"testing
\n
"
;
7
unsigned char
h
[
crypto_hash_BYTES
];
8
9
int
main
(
void
)
10
{
11
size_t
i
;
12
crypto_hash
(
h
,
x
,
sizeof
x
-
1U
);
13
for
(
i
=
0
;
i
<
crypto_hash_BYTES
;++
i
)
printf
(
"%02x"
,(
unsigned int
)
h
[
i
]);
14
printf
(
"
\n
"
);
15
return
0
;
16
}