V, -version show program's version number and exitįull documentation on Read the Docs. h, -help show this help message and exit It has encode, decode and benchmark subcommands. urlsafe_b64decode ( b 'Pj4-Zm9vPz8_' )) # b'>foo?'Ī command-line tool is also provided. standard_b64decode ( b 'Pj4+Zm9vPz8/' )) # b'>foo?' # URL safe encoding helpers print ( pybase64. b64decode ( b 'Pj4_Zm9vPz8:', altchars = '_:', validate = True )) # b'>foo?' # Standard encoding helpers print ( pybase64. To get the fastest decoding, it is recommended to use the pybase64.b64decode and validate=True when possible. Pybase64 uses the same API as Python base64 “modern interface” (introduced in Python 2.4) for an easy integration. Now these functions accept any bytes-like object (opens new window).It aims to provide a fast base64 implementation for base64 encoding/decoding. ![]() Up until Python 3.4 came out, base64 encoding and decoding functions only worked with bytes or bytearray types. If adobe is True, the encoded sequened with be framed with '' as used with Adobe productsīase64.a85decode(b, foldspaces=False, adobe=False, ignorechars=b'\t\n\r\v')Ī bytes-like object of characters to ignore in the encoding process If pad is True, the bytes are padded to a multiple of 4 before encoding The number characters before a newline (0 implies no newlines) If foldspaces is True, the character 'y' will be used instead of 4 consecutive spaces. If valide is True, the characters not in the normal Base64 alphabet or the alternative alphabet are not discarded before the padding checkīase64.a85encode(b, foldspaces=False, wrapcol=0, pad=False, adobe=False) Extra characters are ignored.īase64.b64decode(s, altchars=None, validate=False)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |