Lines Matching refs:alphabet
55 alternative alphabet for the '+' and '/' characters. This allows an
69 which specifies the alternative alphabet used instead of the '+' and '/'
76 normal base-64 alphabet nor the alternative alphabet are discarded prior
77 to the padding check. If validate is True, these non-alphabet characters
92 """Encode bytes-like object s using the standard Base64 alphabet.
99 """Decode bytes encoded with the standard Base64 alphabet.
103 is incorrectly padded. Characters that are not in the standard alphabet
113 """Encode bytes using the URL- and filesystem-safe Base64 alphabet.
116 bytes object. The alphabet uses '-' instead of '+' and '_' instead of
122 """Decode bytes using the URL- and filesystem-safe Base64 alphabet.
127 alphabet, and are not a plus '+' or slash '/', are discarded prior to the
130 The alphabet uses '-' instead of '+' and '_' instead of '/'.
145 Optional casefold is a flag specifying whether a lowercase alphabet is
149 the input is incorrectly padded or if there are non-alphabet
166 def _b32encode(alphabet, s):
170 if alphabet not in _b32tab2:
171 b32tab = [bytes((i,)) for i in alphabet]
172 _b32tab2[alphabet] = [a + b for a in b32tab for b in b32tab]
183 b32tab2 = _b32tab2[alphabet]
202 def _b32decode(alphabet, s, casefold=False, map01=None):
206 if alphabet not in _b32rev:
207 _b32rev[alphabet] = {v: k for k, v in enumerate(alphabet)}
228 b32rev = _b32rev[alphabet]
281 Optional casefold is a flag specifying whether a lowercase alphabet is
285 s is incorrectly padded or if there are non-alphabet characters present