gpt4 book ai didi

java - 使用来自 github 的 AES-256-CBC 加密

转载 作者:行者123 更新时间:2023-12-02 12:07:13 25 4
gpt4 key购买 nike

我想使用这些类 https://github.com/fukata/AES-256-CBC-Example在我的项目中,但即使我编译它而不更改任何内容也会导致错误:

Exception in thread "main" java.lang.RuntimeException: java.security.InvalidKeyException: Illegal key size at AESUtil.encrypt(AESUtil.java:23) at AESMain.main(AESMain.java:10) Caused by: java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039) at javax.crypto.Cipher.implInit(Cipher.java:805) at javax.crypto.Cipher.chooseProvider(Cipher.java:864) at javax.crypto.Cipher.init(Cipher.java:1396) at javax.crypto.Cipher.init(Cipher.java:1327) at AESUtil.encrypt(AESUtil.java:20) ... 1 more

如何解决 key 大小非法?我下载了它并将 java 文件夹复制到我的项目中。任何帮助将不胜感激:)

最佳答案

我相信您需要安装 Java Cryptography Unlimited Strength 扩展:

http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

关于java - 使用来自 github 的 AES-256-CBC 加密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46818474/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com