diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-08-31 13:02:13 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-12-21 22:53:23 +0100 |
commit | b8aa91d150b03e22a5f7f151b9309eba6a1055c3 (patch) | |
tree | ed0a3ba2395c3cecd183ab4c7751ba9cbf0bc82d /lib/base64.h | |
parent | 866a9c3ca1730b39f884f0c42f2082b3870f2268 (diff) |
Bytestring: implement bytestring literals and constants
Implement byte string literals on the format b"xxx" and b64"xxx"
which can be used as literals and in constants.
The format b"xxx" supports character data and octal and
hexadecimal data using C escapes (\n, \nn, \nnn, \xn and \xnn).
The format b64"xxx" supports base64 encoded strings (RFC1341).
Diffstat (limited to 'lib/base64.h')
-rw-r--r-- | lib/base64.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/base64.h b/lib/base64.h new file mode 100644 index 00000000..33d5d4db --- /dev/null +++ b/lib/base64.h @@ -0,0 +1,13 @@ +#ifndef _BIRD_BASE64_H_ +#define _BIRD_BASE64_H_ + +#include "lib/resource.h" + +struct adata; + +struct adata * base64_encode_bs(linpool *pool, const unsigned char *src, size_t len, + size_t *out_len); +struct adata * base64_decode_bs(linpool *pool, const unsigned char *src, size_t len, + size_t *out_len); + +#endif /* _BIRD_BASE64_H_ */ |