#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
◆ MAX_DEC_INPUT_SIZE
#define MAX_DEC_INPUT_SIZE 164 |
Maximum length of input when decoding in base 58.
Definition at line 10 of file base58.h.
◆ MAX_ENC_INPUT_SIZE
#define MAX_ENC_INPUT_SIZE 120 |
Maximum length of input when encoding in base 58.
Definition at line 14 of file base58.h.
◆ base58_decode()
int base58_decode |
( |
const char * |
in, |
|
|
size_t |
in_len, |
|
|
uint8_t * |
out, |
|
|
size_t |
out_len |
|
) |
| |
Decode input string in base 58.
- See also
- https://tools.ietf.org/html/draft-msporny-base58-02
- Parameters
-
[in] | in | Pointer to input string buffer. |
[in] | in_len | Length of the input string buffer. |
[out] | out | Pointer to output byte buffer. |
[in] | out_len | Maximum length to write in output byte buffer. |
- Returns
- number of bytes decoded, -1 otherwise.
Definition at line 45 of file base58.c.
◆ base58_encode()
int base58_encode |
( |
const uint8_t * |
in, |
|
|
size_t |
in_len, |
|
|
char * |
out, |
|
|
size_t |
out_len |
|
) |
| |
Encode input bytes in base 58.
- See also
- https://tools.ietf.org/html/draft-msporny-base58-02
- Parameters
-
[in] | in | Pointer to input byte buffer. |
[in] | in_len | Length of the input byte buffer. |
[out] | out | Pointer to output string buffer. |
[in] | out_len | Maximum length to write in output byte buffer. |
- Returns
- number of bytes encoded, -1 otherwise.
Definition at line 108 of file base58.c.