LEFT | RIGHT |
1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
2 | 2 |
3 """RFC 3548: Base16, Base32, Base64 Data Encodings""" | 3 """RFC 3548: Base16, Base32, Base64 Data Encodings""" |
4 | 4 |
5 # Modified 04-Oct-1995 by Jack Jansen to use binascii module | 5 # Modified 04-Oct-1995 by Jack Jansen to use binascii module |
6 # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support | 6 # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support |
7 # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere | 7 # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere |
8 | 8 |
9 import re | 9 import re |
10 import struct | 10 import struct |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 print(repr(s0)) | 385 print(repr(s0)) |
386 s1 = encodestring(s0) | 386 s1 = encodestring(s0) |
387 print(repr(s1)) | 387 print(repr(s1)) |
388 s2 = decodestring(s1) | 388 s2 = decodestring(s1) |
389 print(repr(s2)) | 389 print(repr(s2)) |
390 assert s0 == s2 | 390 assert s0 == s2 |
391 | 391 |
392 | 392 |
393 if __name__ == '__main__': | 393 if __name__ == '__main__': |
394 main() | 394 main() |
LEFT | RIGHT |