diff options
author | David Sommerseth <davids@redhat.com> | 2011-08-24 13:06:39 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 13:06:39 +0200 |
commit | 20fc33707eab708dfd7e8ffcf2eea0f8362b10b3 (patch) | |
tree | 7f60234df8fc0e073cf40ea25361d1e3f35bed50 /base64.c | |
parent | 3b75dec3e32e7d838ed56be5667d1cf3ac4cef18 (diff) | |
parent | 576dc96ca1ef1badb651e05ac694f07c91e02518 (diff) | |
download | openvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.tar.gz openvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.tar.xz openvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.zip |
Merge branch 'svn-merger'
Diffstat (limited to 'base64.c')
-rw-r--r-- | base64.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -41,7 +41,11 @@ static char base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - +/* + * base64 encode input data of length size to malloced + * buffer which is returned as *str. Returns string + * length of *str. + */ int base64_encode(const void *data, int size, char **str) { @@ -115,7 +119,11 @@ token_decode(const char *token) return DECODE_ERROR; return (marker << 24) | val; } - +/* + * Decode base64 str, outputting data to buffer + * at data of length size. Return length of + * decoded data written or -1 on error or overflow. + */ int base64_decode(const char *str, void *data, int size) { |