summaryrefslogtreecommitdiff
path: root/vere/pkg/ent/tests.c
blob: 90b6ca0c6873aed68340fcd915244f281328301d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "ent.h"

int main(void) {
    char buf[256] = {0};

    if (0 != ent_getentropy(buf, sizeof(buf))) {
        perror("getentropy");
        exit(1);
    }

    for (int i = 0; i < sizeof buf; i++) {
        printf("%02hhx", buf[i]);
    }

    puts("");
}