| < draft-josefsson-rfc3548bis-01.txt | draft-josefsson-rfc3548bis-02.txt > | |||
|---|---|---|---|---|
| Network Working Group S. Josefsson | Network Working Group S. Josefsson | |||
| Internet-Draft March 22, 2006 | Internet-Draft March 24, 2006 | |||
| Obsoletes: 3548 (if approved) | Obsoletes: 3548 (if approved) | |||
| Expires: September 23, 2006 | Expires: September 25, 2006 | |||
| The Base16, Base32, and Base64 Data Encodings | The Base16, Base32, and Base64 Data Encodings | |||
| draft-josefsson-rfc3548bis-01 | draft-josefsson-rfc3548bis-02 | |||
| Status of this Memo | Status of this Memo | |||
| By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
| applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
| have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
| aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
| skipping to change at page 1, line 34 ¶ | skipping to change at page 1, line 34 ¶ | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
| http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
| The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
| http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
| This Internet-Draft will expire on September 23, 2006. | This Internet-Draft will expire on September 25, 2006. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (C) The Internet Society (2006). | Copyright (C) The Internet Society (2006). | |||
| Keywords | Keywords | |||
| Base Encoding, Base64, Base32, Base16, Hex. | Base Encoding, Base64, Base32, Base16, Hex. | |||
| Abstract | Abstract | |||
| skipping to change at page 14, line 5 ¶ | skipping to change at page 14, line 5 ¶ | |||
| Below is an ISO C99 implementation of Base64 encoding and decoding. | Below is an ISO C99 implementation of Base64 encoding and decoding. | |||
| The code assume that the US-ASCII characters are encoding inside | The code assume that the US-ASCII characters are encoding inside | |||
| 'char' with values below 255, which holds for all POSIX platforms, | 'char' with values below 255, which holds for all POSIX platforms, | |||
| but should otherwise be portable. This code is not intended as a | but should otherwise be portable. This code is not intended as a | |||
| normative specification of base64. | normative specification of base64. | |||
| 11.1. Prototypes: base64.h | 11.1. Prototypes: base64.h | |||
| /* base64.h -- Encode binary data using printable characters. | /* base64.h -- Encode binary data using printable characters. | |||
| Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||||
| Written by Simon Josefsson. | ||||
| This program is free software; you can redistribute it | This program is free software; you can redistribute it | |||
| and/or modify it under the terms of the GNU Lesser | and/or modify it under the terms of the GNU Lesser | |||
| General Public License as published by the Free Software | General Public License as published by the Free Software | |||
| Foundation; either version 2.1, or (at your option) any | Foundation; either version 2.1, or (at your option) any | |||
| later version. | later version. | |||
| This program is distributed in the hope that it will be | This program is distributed in the hope that it will be | |||
| useful, but WITHOUT ANY WARRANTY; without even the | useful, but WITHOUT ANY WARRANTY; without even the | |||
| implied warranty of MERCHANTABILITY or FITNESS FOR A | implied warranty of MERCHANTABILITY or FITNESS FOR A | |||
| PARTICULAR PURPOSE. See the GNU Lesser General Public | PARTICULAR PURPOSE. See the GNU Lesser General Public | |||
| License for more details. | License for more details. | |||
| You should have received a copy of the GNU Lesser General | You should have received a copy of the GNU Lesser General | |||
| Public License along with this program; if not, write to | Public License along with this program; if not, write to | |||
| the Free Software Foundation, Inc., 51 Franklin Street, | the Free Software Foundation, Inc., 51 Franklin Street, | |||
| Fifth Floor, Boston, MA 02110-1301, USA. */ | Fifth Floor, Boston, MA 02110-1301, USA. */ | |||
| /* Written by Simon Josefsson. */ | ||||
| #ifndef BASE64_H | #ifndef BASE64_H | |||
| # define BASE64_H | # define BASE64_H | |||
| /* Get size_t. */ | /* Get size_t. */ | |||
| # include <stddef.h> | # include <stddef.h> | |||
| /* Get bool. */ | /* Get bool. */ | |||
| # include <stdbool.h> | # include <stdbool.h> | |||
| /* This uses that the expression (n+(k-1))/k means the | /* This uses that the expression (n+(k-1))/k means the | |||
| skipping to change at page 15, line 15 ¶ | skipping to change at page 15, line 15 ¶ | |||
| extern bool base64_decode_alloc (const char *in, | extern bool base64_decode_alloc (const char *in, | |||
| size_t inlen, | size_t inlen, | |||
| char **out, | char **out, | |||
| size_t *outlen); | size_t *outlen); | |||
| #endif /* BASE64_H */ | #endif /* BASE64_H */ | |||
| 11.2. Implementation: base64.c | 11.2. Implementation: base64.c | |||
| /* base64.c -- Encode binary data using printable characters. | /* base64.c -- Encode binary data using printable characters. | |||
| Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software | ||||
| Foundation, Inc. | ||||
| This program is free software; you can redistribute it | This program is free software; you can redistribute it | |||
| and/or modify it under the terms of the GNU Lesser | and/or modify it under the terms of the GNU Lesser | |||
| General Public License as published by the Free Software | General Public License as published by the Free Software | |||
| Foundation; either version 2.1, or (at your option) any | Foundation; either version 2.1, or (at your option) any | |||
| later version. | later version. | |||
| This program is distributed in the hope that it will be | This program is distributed in the hope that it will be | |||
| useful, but WITHOUT ANY WARRANTY; without even the | useful, but WITHOUT ANY WARRANTY; without even the | |||
| implied warranty of MERCHANTABILITY or FITNESS FOR A | implied warranty of MERCHANTABILITY or FITNESS FOR A | |||
| End of changes. 7 change blocks. | ||||
| 6 lines changed or deleted | 9 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||