java.security.NoSuchAlgorithmException: AES KeyGenerator not available
来源:互联网 发布:网络微信图片发不出去 编辑:程序博客网 时间:2024/05/17 05:10
ssm+shiro项目中用到AES 加密报异常
异常信息
Caused by: java.lang.IllegalStateException: Unable to acquire AES algorithm. This is required to function.
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:59)
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:43)
at org.apache.shiro.mgt.AbstractRememberMeManager.<init>(AbstractRememberMeManager.java:99)
at org.apache.shiro.web.mgt.CookieRememberMeManager.<init>(CookieRememberMeManager.java:87)
at org.apache.shiro.web.mgt.DefaultWebSecurityManager.<init>(DefaultWebSecurityManager.java:75)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 34 more
Caused by: java.security.NoSuchAlgorithmException: AES KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207)
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:56)
... 43 more
解决方法:
修改项目 jdk指向路径
如下图,由原先的C:\Program Files\Java\jdk1.7.0_67 改为 C:\Program Files\Java\jre7 ,重启 eclipse 完成
- java.security.NoSuchAlgorithmException: AES KeyGenerator not available
- Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not availab
- java.security.NoSuchAlgorithmException: TLS SSLContext not available
- java.security.NoSuchAlgorithmException: Algorithm DH not available
- [测试]java.security.NoSuchAlgorithmException HmacSHA256 not available.
- java.security.NoSuchAlgorithmException: Algorithm HmacSHA1 not available
- KeyGenerator not available
- java.security.NoSuchAlgorithmException: SSLContext SSL implementation not found
- RSA premaster secret error: SunTls12RsaPremasterSecret KeyGenerator not available
- 【已解决】 java.security.KeyStoreException: java.security.NoSuchAlgorithmException
- java.security.NoSuchAlgorithmException: No such algorithm: RSA/ECB/PKCS1Padding 问题解决
- java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES 解决方案
- 报错: java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore jks implementa
- aes 256 java.security.InvalidKeyException
- java.security.NoSuchAlgorithmException: Cannot find any provider supporting DESede/CBC/PKCS5Padding
- java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES/ECB/PKCS7Padding
- 登录操作报错 java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES 解决方法
- AES加密 java.security.InvalidKeyException: Illegal key size
- 基于OpenCV的离散哈特莱变换
- 禁用windows 2008R2的恢复模式,防止服务器意外关机而进行恢复模式
- java获取使用mybatis刚插入数据的主键id
- has_secure_password可以使用在update上的原因
- Fragment的动态添加
- java.security.NoSuchAlgorithmException: AES KeyGenerator not available
- 2017全国信号处理技术应用大会暨2017中国信号处理技术工程师年会
- 【React Native开发】
- lua_rawget,lua_rawset,lua_rawgeti,lua_rawseti
- git上传本地单独修改的文件
- 调用CSDN的开发API——>博客接口——>获取博客系统分类【1】
- 两种表示异常类的方法
- http://www.5yun.org/13130.html
- Django中文官方版05-配置后台管理