Lines Matching refs:altchars
32 def _translate(s, altchars):
34 for k, v in altchars.items():
43 def b64encode(s, altchars=None):
46 s is the string to encode. Optional altchars must be a string of at least
55 if altchars is not None:
56 return _translate(encoded, {'+': altchars[0], '/': altchars[1]})
60 def b64decode(s, altchars=None):
63 s is the string to decode. Optional altchars must be a string of at least
71 if altchars is not None:
72 s = _translate(s, {altchars[0]: '+', altchars[1]: '/'})