File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,11 @@ POST request.
74
74
of length 2 which specifies the alternative alphabet used instead of the
75
75
``+ `` and ``/ `` characters.
76
76
77
- A :exc: `binascii.Error ` exception is raised
78
- if *s * is incorrectly padded.
77
+ A :exc: `binascii.Error ` exception is raised if *s * contains incorrect padding.
78
+ When *validate * is ``False `` (the default), extra padding characters and
79
+ discontinuous padding characters (``= `` characters in the middle of the string)
80
+ are silently ignored. When *validate * is ``True ``, such incorrect padding
81
+ will result in a :exc: `binascii.Error `.
79
82
80
83
If *validate * is ``False `` (the default), characters that are neither
81
84
in the normal base-64 alphabet nor the alternative alphabet are
@@ -86,7 +89,6 @@ POST request.
86
89
For more information about the strict base64 check, see :func: `binascii.a2b_base64 `
87
90
88
91
May assert or raise a :exc: `ValueError ` if the length of *altchars * is not 2.
89
-
90
92
.. function :: standard_b64encode(s)
91
93
92
94
Encode :term: `bytes-like object ` *s * using the standard Base64 alphabet
You can’t perform that action at this time.
0 commit comments