author | snej@snej.local |
Tue Mar 10 22:34:39 2009 -0700 (2009-03-10) | |
changeset 19 | 5ade3e09a827 |
permissions | -rw-r--r-- |
jens@0 | 1 |
#include <stdio.h> |
jens@0 | 2 |
#include "mnemonic.h" |
jens@0 | 3 |
|
jens@0 | 4 |
main () |
jens@0 | 5 |
{ |
jens@0 | 6 |
mn_byte buf[0x10000]; |
jens@0 | 7 |
char outbuf[0x90000]; |
jens@0 | 8 |
int buflen; |
jens@0 | 9 |
int n; |
jens@0 | 10 |
|
jens@0 | 11 |
fprintf (stderr, "%s\n", mn_wordlist_version); |
jens@0 | 12 |
|
jens@0 | 13 |
buflen = fread (buf, 1, sizeof (buf), stdin); |
jens@0 | 14 |
n = mn_encode (buf, buflen, outbuf, sizeof outbuf, MN_F64BITSPERLINE); |
jens@0 | 15 |
if (n == 0) |
jens@0 | 16 |
fwrite (outbuf, 1, strlen (outbuf), stdout); |
jens@0 | 17 |
else |
jens@0 | 18 |
fprintf (stderr, "mn_encode error %d\n", n); |
jens@0 | 19 |
putchar ('\n'); |
jens@0 | 20 |
|
jens@0 | 21 |
return 0; |
jens@0 | 22 |
} |