Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b4f47e

Browse files
committed
#25495: Clarify b2a_base64 documentation vis 57 bytes.
1 parent abeb647 commit 2b4f47e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Doc/library/binascii.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ The :mod:`binascii` module defines the following functions:
5555
.. function:: b2a_base64(data)
5656

5757
Convert binary data to a line of ASCII characters in base64 coding. The return
58-
value is the converted line, including a newline char. The length of *data*
59-
should be at most 57 to adhere to the base64 standard.
58+
value is the converted line, including a newline char. The newline is
59+
added because the original use case for this function was to feed it a
60+
series of 57 byte input lines to get output lines that conform to the
61+
MIME-base64 standard. Otherwise the output conforms to :rfc:`3548`.
6062

6163

6264
.. function:: a2b_qp(data, header=False)
@@ -168,7 +170,8 @@ The :mod:`binascii` module defines the following functions:
168170
.. seealso::
169171

170172
Module :mod:`base64`
171-
Support for base64 encoding used in MIME email messages.
173+
Support for RFC compliant base64-style encoding in base 16, 32, 64,
174+
and 85.
172175

173176
Module :mod:`binhex`
174177
Support for the binhex format used on the Macintosh.

0 commit comments

Comments
 (0)