clavitor/clovis/clovis-cli/src/util.h

20 lines
523 B
C

/*
* clavitor CLI — utility functions
*/
#ifndef V84_UTIL_H
#define V84_UTIL_H
#include <stddef.h>
/* base64 encode (standard, with padding) */
int base64_encode(const unsigned char *src, size_t src_len, char *dst, size_t dst_len);
/* base64 decode (handles standard and url-safe, with or without padding) */
int base64_decode(const char *src, unsigned char *dst, size_t dst_len, size_t *out_len);
/* URL-encode a string for query parameters */
void url_encode(const char *src, char *dst, size_t dst_len);
#endif