diff options
author | Bernhard Schmidt <berni@debian.org> | 2020-09-01 16:52:17 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2020-09-01 16:52:17 +0200 |
commit | 9fc3b98112217f2d92a67977dbde0987cc7a1803 (patch) | |
tree | 29fcc8654ee65d9dd89ade797bea2f3d9dfd9cfd /src/openvpn/base64.h | |
parent | a8758c0e03eed188dcb9da0e4fd781a67c25bf1e (diff) | |
parent | 69b02b1f7fd609d84ace13ab04697158de2418a9 (diff) |
Merge branch 'debian/experimental-2.5'
Diffstat (limited to 'src/openvpn/base64.h')
-rw-r--r-- | src/openvpn/base64.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvpn/base64.h b/src/openvpn/base64.h index 5679bc9..f49860f 100644 --- a/src/openvpn/base64.h +++ b/src/openvpn/base64.h @@ -34,6 +34,10 @@ #ifndef _BASE64_H_ #define _BASE64_H_ +/** Compute resulting base64 length. 6 bits per byte, padded to 4 bytes. */ +#define OPENVPN_BASE64_LENGTH(binary_length) \ + ((((8 * binary_length) / 6) + 3) & ~3) + int openvpn_base64_encode(const void *data, int size, char **str); int openvpn_base64_decode(const char *str, void *data, int size); |