Beispiel #1
0
 def code_hashid(self, txt):
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
Beispiel #2
0
 def code_hashid(self, txt):
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
Beispiel #3
0
 def code_hashid(cls, txt: str) -> str:
     txt = txt.lower()
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
Beispiel #4
0
 def code_hashid(cls, txt: str) -> str:
     txt = txt.lower()
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
Beispiel #5
0
 def b58_address_to_hash160(cls, addr):
     addr = to_bytes(addr, 'ascii')
     _bytes = base_decode(addr, length=27, base=58)
     return _bytes[0:3], _bytes[3:23]