Closed Fury-Fox closed 4 years ago
print(sm3.sm3_hash(b"abc")) Traceback (most recent call last): File "", line 1, in File "D:\ProgramData\Anaconda3\lib\site-packages\gmssl\sm3.py", line 95, in sm3_hash msg.append(0x80) AttributeError: 'bytes' object has no attribute 'append'
同样的错误,请问怎么解决?
入参类型不正确。 n = [] for i in hash_data[:]: n.append(i) ret = sm3.sm3_hash(n)
n = []
for i in hash_data[:]:
n.append(i)
ret = sm3.sm3_hash(n)