Created
May 11, 2017 09:14
-
-
Save dsprenkels/36171c2def70636927784985dbb276ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "randombytes.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main() | |
{ | |
const size_t size = 1024*1024; | |
char *buf; | |
size_t idx; | |
buf = calloc(size, sizeof(char)); | |
randombytes(buf, size); | |
for (idx = 0; idx < size; idx++) printf("%02hhx", buf[idx]); | |
printf("\n"); | |
free(buf); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment