1 个回答

提示很明显,key 长度不对。AES 只支持 16、24、32 字节的 key。

参见:https://stackoverflow.com/que...

AES only supports key sizes of 16, 24 or 32 bytes. You either need to provide exactly that amount or you derive the key from what you type in.

还有 rsa 是非对称加密,aes 是对称加密。

常见的对称加密算法主要有 DES、3DES、AES 等,常见的非对称算法主要有 RSA、DSA 等,散列算法主要有 SHA-1、MD5 等。
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题