Hush Full Node software. We were censored from Github, this is where all development happens now. https://hush.is
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
651 B

#include <stdio.h>
#include <time.h>
#include <string.h>
#include "bip39.h"
#include <sodium.h>
// NOTE: We must override this to implement actual RNG!
void random_buffer(uint8_t *buf, size_t len) {
if( len > 0 ) {
randombytes_buf(buf, len);
}
}
int main(int argc, char **argv)
{
char *this = argv[0];
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", this);
return 1;
}
if (sodium_init() == -1) {
fprintf(stderr, "libsodium init failed! :(\n");
return 1;
}
int strength = 256;
const char *mnemonic = mnemonic_generate(strength);
printf("%s\n", mnemonic);
return 0;
}