Exemplo n.º 1
0
def make_chksum_6(s):
    from mmgen.obj import HexStr
    return HexStr(sha256(s).hexdigest()[:6])
Exemplo n.º 2
0
def make_chksum_6(s):
    from mmgen.obj import HexStr
    if type(s) == unicode: s = s.encode('utf8')
    return HexStr(sha256(s).hexdigest()[:6])
Exemplo n.º 3
0
def make_chksum_6(s):
    from mmgen.obj import HexStr
    if isinstance(s, str): s = s.encode()
    return HexStr(sha256(s).hexdigest()[:6])