NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
base64.h
Go to the documentation of this file.
1
21#ifndef MUTT_LIB_BASE64_H
22#define MUTT_LIB_BASE64_H
23
24#include <stdio.h>
25
26struct Buffer;
27
28extern const int Index64[];
29
30#define base64val(ch) Index64[(unsigned int) (ch)]
31
32int mutt_b64_decode(const char *in, char *out, size_t olen);
33size_t mutt_b64_encode(const char *in, size_t inlen, char *out, size_t outlen);
34
35int mutt_b64_buffer_decode(struct Buffer *buf, const char *in);
36size_t mutt_b64_buffer_encode(struct Buffer *buf, const char *in, size_t len);
37
38#endif /* MUTT_LIB_BASE64_H */
size_t mutt_b64_encode(const char *in, size_t inlen, char *out, size_t outlen)
Convert raw bytes to null-terminated base64 string.
Definition: base64.c:88
size_t mutt_b64_buffer_encode(struct Buffer *buf, const char *in, size_t len)
Convert raw bytes to null-terminated base64 string.
Definition: base64.c:199
int mutt_b64_decode(const char *in, char *out, size_t olen)
Convert null-terminated base64 string to raw bytes.
Definition: base64.c:136
int mutt_b64_buffer_decode(struct Buffer *buf, const char *in)
Convert null-terminated base64 string to raw bytes.
Definition: base64.c:217
const int Index64[]
Lookup table for Base64 encoding characters.
Definition: base64.c:62
String manipulation buffer.
Definition: buffer.h:34