Open liusong2013 opened 8 years ago
@dqmmpb i test it , copy jsencrypt ' text , report exception
Exception in thread "main" javax.crypto.BadPaddingException: unknown block type at org.bouncycastle.jcajce.provider.asymmetric.rsa.CipherSpi.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2087) at com.tech84.util.RSADemo2.decrypt(RSADemo2.java:77) at com.tech84.util.RSADemo2.main(RSADemo2.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
@jik1992 sorry, i only post a part of my code, here is my rsa-demo, a maven project, i think it can help you
I'm facing the same problem.. is there a solution? Decryption happens in pkcs8 format..
@dqmmpb still errors, javax.crypto.BadPaddingException: unknown block type
js client
java
you only need get cipher instance with RSA/None/PKCS1Padding in Java.