Esempio n. 1
0
def test_base52_hash_with_1234567890_10_QqhsMHZ7Pf():
    assert base52.hash(1234567890, 10) == 'QqhsMHZ7Pf'
Esempio n. 2
0
def test_base52_hash_fail_with_19770609664_6():
    assert base52.hash(19770609664, 6)
Esempio n. 3
0
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`
print(base36.maximum(HASH_LENGTH))
Esempio n. 4
0
def test_base52_hash_fail_with_19770609664_6():
    assert base52.hash(19770609664, 6)
Esempio n. 5
0
def test_base52_hash_with_1234567890_10_QqhsMHZ7Pf():
    assert base52.hash(1234567890, 10) == 'QqhsMHZ7Pf'
Esempio n. 6
0
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`
print base36.maximum(HASH_LENGTH)
Esempio n. 7
0
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`
print base36.maximum(HASH_LENGTH)