Searched refs:altchars (Results 1 – 3 of 3) sorted by relevance
/external/python/cpython2/Lib/ |
D | base64.py | 33 def _translate(s, altchars): argument 35 for k, v in altchars.items(): 43 def b64encode(s, altchars=None): argument 55 if altchars is not None: 56 return encoded.translate(string.maketrans(b'+/', altchars[:2])) 60 def b64decode(s, altchars=None): argument 72 if altchars is not None: 73 s = s.translate(string.maketrans(altchars[:2], '+/'))
|
/external/python/cpython2/Lib/test/ |
D | test_base64.py | 79 eq(base64.b64encode('\xd3V\xbeo\xf7\x1d', altchars='*$'), '01a*b$cd') 83 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 118 eq(base64.b64decode('01a*b$cd', altchars='*$'), '\xd3V\xbeo\xf7\x1d')
|
/external/python/cpython2/Doc/library/ |
D | base64.rst | 27 .. function:: b64encode(s[, altchars]) 31 *s* is the string to encode. Optional *altchars* must be a string of at least 40 .. function:: b64decode(s[, altchars]) 44 *s* is the string to decode. Optional *altchars* must be a string of at least
|