projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdate
[gnulib.git]
/
lib
/
base64.c
diff --git
a/lib/base64.c
b/lib/base64.c
index
33aec10
..
4dbd80a
100644
(file)
--- 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
#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)
{
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
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)
bool
base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen)