예제 #1
0
 def code_hashid(self, txt):
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
예제 #2
0
파일: qt.py 프로젝트: nvk/electrum
 def code_hashid(self, txt):
     x = to_bytes(txt, 'utf8')
     hash = sha256(x).hexdigest()
     return hash[-3:].upper()
예제 #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()
예제 #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()
예제 #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]