def sha256(b4x16):
    w = ([0] * 64)
    print(b4x16)
    for i in range(16):
        w[i] = b4x16[i]
    for i in range(16, 64):
        wi_15 = w[(i - 15)]
        s0 = ((rotr(wi_15, 7) ^ rotr(wi_15, 18)) ^ (wi_15 >> 3))
        wi_2 = w[(i - 2)]
        s1 = ((rotr(wi_2, 17) ^ rotr(wi_2, 19)) ^ (wi_2 >> 10))
        wi_16 = w[(i - 16)]
        wi_7 = w[(i - 7)]
        w[i] = ((((wi_16 + s0) + wi_7) + s1) & 4294967295)
    (a, b, c, d, e, f, g, h) = _h
    for i in range(64):
        s0 = ((rotr(a, 2) ^ rotr(a, 13)) ^ rotr(a, 22))
        maj = (((a & b) ^ (a & c)) ^ (b & c))
        t2 = (s0 + maj)
        s1 = ((rotr(e, 6) ^ rotr(e, 11)) ^ rotr(e, 25))
        ch = ((e & f) ^ ((~ e) & g))
        t1 = ((((h + s1) + ch) + _k[i]) + w[i])
        h = g
        g = f
        f = e
        e = ((d + t1) & 4294967295)
        d = c
        c = b
        b = a
        a = ((t1 + t2) & 4294967295)
    _lst = [a, b, c, d, e, f, g, h]
    for i in range(8):
        _h[i] = ((_h[i] + _lst[i]) & 4294967295)
    for i in _h:
        print('{:08x}'.format(i))
    print('===========')
    return _h
def sha256(b4x16):
    w = ([0] * 64)
    print(b4x16)
    for i in range(16):
        w[i] = b4x16[i]
    for i in range(16, 64):
        wi_15 = w[(i - 15)]
        s0 = ((rotr(wi_15, 7) ^ rotr(wi_15, 18)) ^ (wi_15 >> 3))
        wi_2 = w[(i - 2)]
        s1 = ((rotr(wi_2, 17) ^ rotr(wi_2, 19)) ^ (wi_2 >> 10))
        wi_16 = w[(i - 16)]
        wi_7 = w[(i - 7)]
        w[i] = ((((wi_16 + s0) + wi_7) + s1) & 4294967295)
    (a, b, c, d, e, f, g, h) = _h
    for i in range(64):
        s0 = ((rotr(a, 2) ^ rotr(a, 13)) ^ rotr(a, 22))
        maj = (((a & b) ^ (a & c)) ^ (b & c))
        t2 = (s0 + maj)
        s1 = ((rotr(e, 6) ^ rotr(e, 11)) ^ rotr(e, 25))
        ch = ((e & f) ^ ((~ e) & g))
        t1 = ((((h + s1) + ch) + _k[i]) + w[i])
        h = g
        g = f
        f = e
        e = ((d + t1) & 4294967295)
        d = c
        c = b
        b = a
        a = ((t1 + t2) & 4294967295)
    _lst = [a, b, c, d, e, f, g, h]
    for i in range(8):
        _h[i] = ((_h[i] + _lst[i]) & 4294967295)
    for i in _h:
        print('{:08x}'.format(i))
    print('===========')
    return _h