Closed soloicesky closed 4 years ago
sl@sl-VirtualBox:~/workspace/golden_data$ python sm4test.py Traceback (most recent call last): File "sm4test.py", line 8, in crypt_sm4.set_key(key, SM4_ENCRYPT) File "/usr/local/lib/python2.7/dist-packages/gmssl/sm4.py", line 95, in set_key MK[0] = get_uint32_be(key[0:4]) File "/usr/local/lib/python2.7/dist-packages/gmssl/func.py", line 8, in get_uint32_be = lambda key_data:((key_data[0] << 24) | (key_data[1] << 16) | (key_data[2] << 8) | (key_data[3])) TypeError: unsupported operand type(s) for <<: 'str' and 'int'
Python 2.7 is not supported
sl@sl-VirtualBox:~/workspace/golden_data$ python sm4test.py Traceback (most recent call last): File "sm4test.py", line 8, in
crypt_sm4.set_key(key, SM4_ENCRYPT)
File "/usr/local/lib/python2.7/dist-packages/gmssl/sm4.py", line 95, in set_key
MK[0] = get_uint32_be(key[0:4])
File "/usr/local/lib/python2.7/dist-packages/gmssl/func.py", line 8, in
get_uint32_be = lambda key_data:((key_data[0] << 24) | (key_data[1] << 16) | (key_data[2] << 8) | (key_data[3]))
TypeError: unsupported operand type(s) for <<: 'str' and 'int'