clightning-dumpkeys

dump clightning output descriptors
git clone git://jb55.com/clightning-dumpkeys
Log | Files | Refs | README | LICENSE

base58.h (689B)


      1 
      2 #ifndef LIBWALLY_BASE58_H
      3 #define LIBWALLY_BASE58_H
      4 
      5 #include <stdint.h>
      6 #include <stdlib.h>
      7 
      8 /**
      9  * Calculate the base58 checksum of a block of binary data.
     10  *
     11  * @bytes: Binary data to calculate the checksum for.
     12  * @len: The length of @bytes in bytes.
     13  */
     14 uint32_t base58_get_checksum(
     15 	const unsigned char *bytes,
     16 	size_t len);
     17 
     18 int wally_base58_from_bytes(const unsigned char *bytes, size_t bytes_len,
     19                             uint32_t flags, char **output);
     20 
     21 int wally_base58_to_bytes(
     22 	const char *str_in,
     23 	uint32_t flags,
     24 	unsigned char *bytes_out,
     25 	size_t len,
     26 	size_t *written);
     27 
     28 #define BASE58_FLAG_CHECKSUM 0x1
     29 #define BASE58_CHECKSUM_LEN 4
     30 
     31 #endif /* LIBWALLY_BASE58_H */