Skip to content

Instantly share code, notes, and snippets.

@scooby
Created February 8, 2009 05:33
Show Gist options
  • Save scooby/60213 to your computer and use it in GitHub Desktop.
Save scooby/60213 to your computer and use it in GitHub Desktop.
#include <openssl/rand.h>
#include <stdio.h>
int main(void) {
unsigned char c;
int i;
for(i = 0; i < 100; i++) {
RAND_pseudo_bytes(&c, 1);
printf("Trial %d: %hhu %hhu\n", i, c, (c < 24 ? ~c : c));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment