加密失败了,具体是原因??.security.InvalidKeyException: No installed provider supports this key: (null)

多学习多思考 发布于 02/25 19:38
阅读 107
收藏 0

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:67)
Caused by: java.security.InvalidKeyException: No installed provider supports this key: (null)
    at javax.crypto.Cipher.chooseProvider(Cipher.java:892)
    at javax.crypto.Cipher.init(Cipher.java:1248)
    at javax.crypto.Cipher.init(Cipher.java:1185)

加载中
0
chentao106
chentao106

请贴出你初始化密钥的代码,应该是初始化密钥逻辑有问题,没有传入对应的加密算法

返回顶部
顶部