OverflowError
Python int too large to convert to C long
File "H:\spinal code cloud\程序\spinal codes_ver3.7_an\A_Lookup3.py", line 17, in lookup3Init
lookup3array = np.array([0xdeadbeef + val] * 3, dtype=np.uint32)
File "H:\spinal code cloud\程序\spinal codes_ver3.7_an\A_Hash.py", line 29, in hash_func
hash_state = lookup3Init(s)
File "H:\spinal code cloud\程序\spinal codes_ver3.7_an\A_Encoder.py", line 80, in init
spine_value = hash_func(spine_value, block)
File "H:\spinal code cloud\程序\spinal codes_ver3.7_an\A_Spinal.py", line 82, in
encoder = Encoder(k, map_func, message)
def lookup3Init(val):
lookup3array = np.array([0xdeadbeef + val] * 3, dtype=np.uint32) #这里有问题
lookup3list = list(lookup3array)
return lookup3list
def lookup3Update(state, data):
def rot(x,k):
return (((x) << (k)) | ((x) >> (32-(k)))) #
state[1] += data
state[2] ^= state[1] #这里有问题
state[2] -= rot(state[1],14)
state[0] ^= state[2]
state[0] -= rot(state[2],11)
state[1] ^= state[0]
state[1] -= rot(state[0],25)
state[2] ^= state[1]
state[2] -= rot(state[1],16)
state[0] ^= state[2]
state[0] -= rot(state[2],4)
state[1] ^= state[0]
state[1] -= rot(state[0],14)
state[2] ^= state[1]
state[2] -= rot(state[1],24)
return state
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。