summaryrefslogtreecommitdiff
path: root/gl/lib/base64.c
AgeCommit message (Collapse)Author
2008-05-19use gnulib's base64 module, now that it's sync'd to match this oneJim Meyering
* gl/lib/base64.c: Remove file. * gl/lib/base64.h: Remove file.
2008-05-05base64 module: adjust API so it's compatible with gnulib'sBo Borgerson
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in, treat newlines as garbage (this is the historical behavior). Formerly base64_decode. (base64_decode_alloc_ctx): Formerly base64_decode_alloc. * gl/lib/base64.h (base64_decode): Macro for four-argument calls. (base64_decode_alloc): Likewise. * src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-01-05Avoid a used-uninitialized bug for invalid input, i.e., when the sizeJim Meyering
of the input, not counting newlines, is 1 % 4. * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4. It may be smaller when flushing.
2007-01-04[ChangeLog]Jim Meyering
When decoding, always allow newlines in input, with almost no performance impact. * src/base64.c (do_decode): Initialize decode context. Call base64_decode one more time, after all input is processed. (usage): When decoding, newlines are always accepted. * tests/misc/base64: Add a bunch of tests, for the above. * gl/lib/base64.c: Include <string.h>. (base64_decode_ctx_init, get_4, decode_4): New functions. (base64_decode): Efficiently handle interspersed newlines. (base64_decode_alloc): Update signature. * gl/lib/base64.h (struct base64_decode_context): Define. (base64_decode_ctx_init): Add prototype. (base64_decode, base64_decode_alloc): Update prototypes. [doc/ChangeLog] * coreutils.texi (base64 invocation): When decoding, newlines are always accepted.
2007-01-04* gl/lib/base64.c: Copied from gnulib.Jim Meyering
* gl/lib/base64.h: Likewise.