X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fbase64.c;h=4dbd80a1c0c1797dc0faae125d9fa0b6e5111302;hb=fdba88ca5c48680a219e742f0b3d480daf74703d;hp=33aec105caa3e43246930f32aa7e97cfa8f3d49c;hpb=cb3daf31594e9878c49852af733a4f833353a2bc;p=gnulib.git diff --git a/lib/base64.c b/lib/base64.c index 33aec105c..4dbd80a1c 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -291,7 +291,8 @@ static const signed char b64[0x100] = { #endif /* Return true if CH is a character from the Base64 alphabet, and - false otherwise. */ + false otherwise. Note that '=' is padding and not considered to be + part of the alphabet. */ bool isbase64 (char ch) { @@ -304,7 +305,9 @@ isbase64 (char ch) otherwise. If *OUTLEN is too small, as many bytes as possible will be written to OUT. On return, *OUTLEN holds the length of decoded bytes in OUT. Note that as soon as any non-alphabet characters are - encountered, decoding is stopped and false is returned. */ + encountered, decoding is stopped and false is returned. This means + that, when applicable, you must remove any line terminators that is + part of the data stream before calling this function. */ bool base64_decode (const char *restrict in, size_t inlen, char *restrict out, size_t *outlen)