X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/236f657b6dab66f31f4902cecfc03b4673f5bb98..4729aa69dab96d801f2767be4b254997c21d1d32:/codec/base64.3?ds=inline diff --git a/codec/base64.3 b/codec/base64.3 index ddab190..39de50d 100644 --- a/codec/base64.3 +++ b/codec/base64.3 @@ -17,6 +17,12 @@ base64, base32, hex \- obsolete binary encoding functions .B "#include " .B "#include " +.B "typedef struct {" +.B "\h'4n'char *indent;" +.B "\h'4n'unsigned maxline;" +.B "\h'4n'..." +.B "} base64_ctx;" + .BI "void base64_encode(base64_ctx *" ctx , .BI " const void *" p ", size_t " sz , .BI " dstr *" d ); @@ -25,6 +31,12 @@ base64, base32, hex \- obsolete binary encoding functions .BI " dstr *" d ); .BI "void base64_init(base64_ctx *" ctx ); +.B "typedef struct {" +.B "\h'4n'char *indent;" +.B "\h'4n'unsigned maxline;" +.B "\h'4n'..." +.B "} base32_ctx;" + .BI "void base32_encode(base32_ctx *" ctx , .BI " const void *" p ", size_t " sz , .BI " dstr *" d ); @@ -33,6 +45,12 @@ base64, base32, hex \- obsolete binary encoding functions .BI " dstr *" d ); .BI "void base32_init(base32_ctx *" ctx ); +.B "typedef struct {" +.B "\h'4n'char *indent;" +.B "\h'4n'unsigned maxline;" +.B "\h'4n'..." +.B "} hex_ctx;" + .BI "void hex_encode(hex_ctx *" ctx , .BI " const void *" p ", size_t " sz , .BI " dstr *" d ); @@ -44,7 +62,7 @@ base64, base32, hex \- obsolete binary encoding functions .SH DESCRIPTION The .BR base64 , -.B base32 +.BR base32 , and .B hex functions perform encoding and decoding of arbitrary binary strings, as