Files
lightning/external/libwally-core/src/mnemonic.h
Rusty Russell f42f34b82d external: new subdirectory for all external libraries and submodules.
You will want to 'make distclean' after this.

I also removed libsecp; we use the one in in libwally anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-29 17:54:14 +02:00

37 lines
927 B
C

#ifndef LIBWALLY_MNEMONIC_H
#define LIBWALLY_MNEMONIC_H
struct words;
/**
* Return a mnemonic representation of a block of bytes.
*
* @w: List of words.
* @bytes_in: Bytes to convert to a mnemonic sentence.
* @len: The length of @bytes_in in bytes.
*
* @bytes_in must be an even multiple of the number of bits in the wordlist used.
*/
char *mnemonic_from_bytes(
const struct words *w,
const unsigned char *bytes_in,
size_t len);
/**
* Convert a mnemonic representation into a block of bytes.
*
* @w: List of words.
* @mnemonic: Mnemonic sentence to store.
* @bytes_out: Where to store the converted representation.
* @len: The length of @bytes_out in bytes.
* @written: Destination for the number of bytes written.
*/
int mnemonic_to_bytes(
const struct words *w,
const char *mnemonic,
unsigned char *bytes_out,
size_t len,
size_t *written);
#endif /* LIBWALLY_MNEMONIC_H */