Home | History | Annotate | Download | only in Lib

Lines Matching refs:altchars

51 def b64encode(s, altchars=None):
54 Optional altchars should be a byte string of length 2 which specifies an
59 if altchars is not None:
60 assert len(altchars) == 2, repr(altchars)
61 return encoded.translate(bytes.maketrans(b'+/', altchars))
65 def b64decode(s, altchars=None, validate=False):
68 Optional altchars must be a bytes-like object or ASCII string of length 2
81 if altchars is not None:
82 altchars = _bytes_from_decode_data(altchars)
83 assert len(altchars) == 2, repr(altchars)
84 s = s.translate(bytes.maketrans(altchars, b'+/'))