File: hash3.c

package info (click to toggle)
libsodium 1.0.18-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,480 kB
  • sloc: ansic: 45,158; asm: 4,264; makefile: 870; sh: 640; python: 405; xml: 30; pascal: 11
file content (20 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

#define TEST_NAME "hash3"
#include "cmptest.h"

static unsigned char x[] = "testing\n";
static unsigned char h[crypto_hash_BYTES];

int
main(void)
{
    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");

    return 0;
}