Esempio n. 1
0
def make_chksum_6(s):
    from mmgen.obj import HexStr
    return HexStr(sha256(s).hexdigest()[:6])
Esempio 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])
Esempio 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])