Beispiel #1
0
def test_base36_hash_with_1234567890_10_FT9Q9O71KI():
    assert base36.hash(1234567890, 10) == 'FT9Q9O71KI'
Beispiel #2
0
def test_base36_hash_fail_with_2176782336_6():
    assert base36.hash(2176782336, 6)
Beispiel #3
0
print(base58.encode(200))
print(base62.encode(200))
print(base94.encode(200))

# Base decode encoded string.
print(base36.decode('5K'))
print(base52.decode('3r'))
print(base56.decode('5a'))
print(base58.decode('4T'))
print(base62.decode('3E'))
print(base94.decode('#-'))

# Base hash an integer/long
# Takes an option param, length, which is defaulted to
# basehash.base.HASH_LENGTH
print(base36.hash(200))
print(base52.hash(200))
print(base56.hash(200))
print(base58.hash(200))
print(base62.hash(200))
print(base94.hash(200))

# Base unhash hashed string.
print(base36.unhash('LUEREG'))
print(base52.unhash('bXmcJ8'))
print(base56.unhash('byvT3s'))
print(base58.unhash('cCGYMV'))
print(base62.unhash('bcWuqW'))
print(base94.unhash('Z$_P7y'))

# Get maximum number for hashing by `length`
def test_base36_hash_fail_with_2176782336_6():
    assert base36.hash(2176782336, 6)
def test_base36_hash_with_1234567890_10_FT9Q9O71KI():
    assert base36.hash(1234567890, 10) == 'FT9Q9O71KI'
Beispiel #6
0
print base58.encode(200)
print base62.encode(200)
print base94.encode(200)

# Base decode encoded string.
print base36.decode("5K")
print base52.decode("3r")
print base56.decode("5a")
print base58.decode("4T")
print base62.decode("3E")
print base94.decode("#-")

# Base hash an integer/long
# Takes an option param, length, which is defaulted to
# basehash.base.HASH_LENGTH
print base36.hash(200)
print base52.hash(200)
print base56.hash(200)
print base58.hash(200)
print base62.hash(200)
print base94.hash(200)

# Base unhash hashed string.
print base36.unhash("LUEREG")
print base52.unhash("bXmcJ8")
print base56.unhash("byvT3s")
print base58.unhash("cCGYMV")
print base62.unhash("bcWuqW")
print base94.unhash("Z$_P7y")

# Get maximum number for hashing by `length`
Beispiel #7
0
print base58.encode(200)
print base62.encode(200)
print base94.encode(200)

# Base decode encoded string.
print base36.decode('5K')
print base52.decode('3r')
print base56.decode('5a')
print base58.decode('4T')
print base62.decode('3E')
print base94.decode('#-')

# Base hash an integer/long
# Takes an option param, length, which is defaulted to
# basehash.base.HASH_LENGTH
print base36.hash(200)
print base52.hash(200)
print base56.hash(200)
print base58.hash(200)
print base62.hash(200)
print base94.hash(200)

# Base unhash hashed string.
print base36.unhash('LUEREG')
print base52.unhash('bXmcJ8')
print base56.unhash('byvT3s')
print base58.unhash('cCGYMV')
print base62.unhash('bcWuqW')
print base94.unhash('Z$_P7y')

# Get maximum number for hashing by `length`