Decode the z85-encoded bytes-like object or ASCII string b The result is returned as a bytes object.
(s)
| 513 | return b85encode(s).translate(_z85_encode_translation) |
| 514 | |
| 515 | def z85decode(s): |
| 516 | """Decode the z85-encoded bytes-like object or ASCII string b |
| 517 | |
| 518 | The result is returned as a bytes object. |
| 519 | """ |
| 520 | s = _bytes_from_decode_data(s) |
| 521 | s = s.translate(_z85_decode_translation) |
| 522 | try: |
| 523 | return b85decode(s) |
| 524 | except ValueError as e: |
| 525 | raise ValueError(e.args[0].replace('base85', 'z85')) from None |
| 526 | |
| 527 | # Legacy interface. This code could be cleaned up since I don't believe |
| 528 | # binascii has any line length limitations. It just doesn't seem worth it |
nothing calls this directly
no test coverage detected