util: extend unbase64mem() to accept secure flag
When the flag is set, buffer is cleared on failure.
This commit is contained in:
@@ -33,6 +33,9 @@ ssize_t base64mem(const void *p, size_t l, char **out);
|
||||
int base64_append(char **prefix, int plen,
|
||||
const void *p, size_t l,
|
||||
int margin, int width);
|
||||
int unbase64mem(const char *p, size_t l, void **mem, size_t *len);
|
||||
int unbase64mem_full(const char *p, size_t l, bool secure, void **mem, size_t *len);
|
||||
static inline int unbase64mem(const char *p, size_t l, void **mem, size_t *len) {
|
||||
return unbase64mem_full(p, l, false, mem, len);
|
||||
}
|
||||
|
||||
void hexdump(FILE *f, const void *p, size_t s);
|
||||
|
||||
Reference in New Issue
Block a user