We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,在跑代码的时候发现第74行报错 Object type <class 'str'> cannot be passed to C code 应该是AES的时候出现了问题 请问应该怎么解决呢
The text was updated successfully, but these errors were encountered:
将key,iv转换成byte类型,也就是加个 .encode('utf-8'),另外在encrypt(msg)也要将msg改为msg.encode('utf-8')
Sorry, something went wrong.
cipher = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8')) # 加密后得到的是bytes类型的数据 encryptedbytes = cipher.encrypt(msg.encode('utf-8'))
No branches or pull requests
您好,在跑代码的时候发现第74行报错
Object type <class 'str'> cannot be passed to C code
应该是AES的时候出现了问题
请问应该怎么解决呢
The text was updated successfully, but these errors were encountered: