Changeset View
Changeset View
Standalone View
Standalone View
contrib/testgen/base58.py
Show All 12 Lines | |||||
class SHA256: | class SHA256: | ||||
new = hashlib.sha256 | new = hashlib.sha256 | ||||
if str != bytes: | if str != bytes: | ||||
# Python 3.x | # Python 3.x | ||||
def ord(c): | def ord(c): # noqa: A001 | ||||
return c | return c | ||||
def chr(n): | def chr(n): # noqa: A001 | ||||
return bytes((n,)) | return bytes((n,)) | ||||
__b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' | __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' | ||||
__b58base = len(__b58chars) | __b58base = len(__b58chars) | ||||
b58chars = __b58chars | b58chars = __b58chars | ||||
def b58encode(v): | def b58encode(v): | ||||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |