Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems outsourcing RSA encryption and decryption
    primarykey
    data
    text
    <p>i have a problem with RSA encryption and decryption. I'm developing in android and would like to outsource the RSA encryption and decryption. My source code worked well before i tried to outsource it.</p> <p>I created a private key and public key and saved it as private.key and public.key. The error is a ClassNotFoundException caused by this method:</p> <pre><code>public Key getPrivateKey(){ try { InputStream fis = activity.getResources().openRawResource(R.raw.private); ObjectInputStream ois = new ObjectInputStream(fis); Key RSAprivateKey = (Key)ois.readObject(); return RSAprivateKey; } catch (FileNotFoundException e) { Log.e("FileNotFound","FileNotFound"); e.printStackTrace(); } catch (IOException e) { Log.e("IOEXception","IOEXception"); e.printStackTrace(); } catch (ClassNotFoundException e) { Log.e("ClassNotFound","ClassNotFound"); Log.e("Errro", "Error: "+ e.getMessage()); Log.e("error", e.toString()); e.printStackTrace(); } return null; } </code></pre> <p>I looked at the logcat and got this error message:</p> <pre><code>E/ClassNotFound(1205): ClassNotFound 03-19 13:54:52.176: E/Errro(1205): Error: com.android.org.bouncycastle.jce.provider.JCERSAPrivateCrtKey 03-19 13:54:52.176: E/error(1205): java.lang.ClassNotFoundException: com.android.org.bouncycastle.jce.provider.JCERSAPrivateCrtKey </code></pre> <p>I hope you understand my problem, because English is not my native language.</p> <p>Edit: I found out that the problem is not caused by outsourcing the code. So i guess the topic can be marked as solved.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload