@@ -1050,15 +1050,15 @@ binascii.a2b_ascii85
10501050 ignorechars: Py_buffer = b''
10511051 A byte string containing characters to ignore from the input.
10521052 canonical: bool = False
1053- When set to true, reject non-canonical encodings per RFC 4648 section 3.5 .
1053+ When set to true, reject non-canonical encodings.
10541054
10551055Decode Ascii85 data.
10561056[clinic start generated code]*/
10571057
10581058static PyObject *
10591059binascii_a2b_ascii85_impl (PyObject * module , Py_buffer * data , int foldspaces ,
10601060 int adobe , Py_buffer * ignorechars , int canonical )
1061- /*[clinic end generated code: output=09b35f1eac531357 input=75a0dcab97528ade ]*/
1061+ /*[clinic end generated code: output=09b35f1eac531357 input=dd050604ed30199e ]*/
10621062{
10631063 const unsigned char * ascii_data = data -> buf ;
10641064 Py_ssize_t ascii_len = data -> len ;
@@ -1178,8 +1178,7 @@ binascii_a2b_ascii85_impl(PyObject *module, Py_buffer *data, int foldspaces,
11781178 * bin_data ++ = (leftchar >> (24 - 8 * i )) & 0xff ;
11791179 }
11801180
1181- /* https://datatracker.ietf.org/doc/html/rfc4648.html#section-3.5
1182- * Decoders MAY reject non-canonical encodings. */
1181+ /* Reject non-canonical encodings in the final group. */
11831182 if (canonical && chunk_len < 4 ) {
11841183 if (chunk_len == 0 ) {
11851184 state = get_binascii_state (module );
@@ -1367,7 +1366,7 @@ binascii.a2b_base85
13671366 ignorechars: Py_buffer = b''
13681367 A byte string containing characters to ignore from the input.
13691368 canonical: bool = False
1370- When set to true, reject non-canonical encodings per RFC 4648 section 3.5 .
1369+ When set to true, reject non-canonical encodings.
13711370
13721371Decode a line of Base85 data.
13731372[clinic start generated code]*/
@@ -1376,7 +1375,7 @@ static PyObject *
13761375binascii_a2b_base85_impl (PyObject * module , Py_buffer * data ,
13771376 PyBytesObject * alphabet , Py_buffer * ignorechars ,
13781377 int canonical )
1379- /*[clinic end generated code: output=90dfef0c6b51e5f3 input=fe3bb2d3a66b9842 ]*/
1378+ /*[clinic end generated code: output=90dfef0c6b51e5f3 input=2819dc8aeffee5a2 ]*/
13801379{
13811380 const unsigned char * ascii_data = data -> buf ;
13821381 Py_ssize_t ascii_len = data -> len ;
@@ -1462,8 +1461,7 @@ binascii_a2b_base85_impl(PyObject *module, Py_buffer *data,
14621461 * bin_data ++ = (leftchar >> (24 - 8 * i )) & 0xff ;
14631462 }
14641463
1465- /* https://datatracker.ietf.org/doc/html/rfc4648.html#section-3.5
1466- * Decoders MAY reject non-canonical encodings. */
1464+ /* Reject non-canonical encodings in the final group. */
14671465 if (canonical && chunk_len < 4 ) {
14681466 if (chunk_len == 0 ) {
14691467 /* 1-char partial group is never produced by a conforming
0 commit comments