I am new to Java. I followed this tutorial about Encryption and Decryption using 3DES algorithm.
I have implemented like this:
- Created a class and placed the 3DES code provided in the above link.
Called the encrypt method in the above link as below:
String encryptedPassword = Encrypter.encrypt(edtText.getText().toString());
I am getting the exception in logcat as below:
05-02 15:19:10.804: W/System.err(4445): java.security.NoSuchProviderException: Provider not available: SunJCE
05-02 15:19:10.820: W/System.err(4445): at javax.crypto.Cipher.getInstance(Cipher.java:209)
05-02 15:19:10.820: W/System.err(4445): at com.example.utilities.Encrypter.encrypt(Encrypter.java:46)
05-02 15:19:10.820: W/System.err(4445): at com.example.screens.RegisterScreen.onClick(RegisterScreen.java:152)
05-02 15:19:10.820: W/System.err(4445): at android.view.View.performClick(View.java:2485)
05-02 15:19:10.820: W/System.err(4445): at android.view.View$PerformClick.run(View.java:9080)
05-02 15:19:10.828: W/System.err(4445): at android.os.Handler.handleCallback(Handler.java:587)
05-02 15:19:10.828: W/System.err(4445): at android.os.Handler.dispatchMessage(Handler.java:92)
05-02 15:19:10.828: W/System.err(4445): at android.os.Looper.loop(Looper.java:130)
05-02 15:19:10.828: W/System.err(4445): at android.app.ActivityThread.main(ActivityThread.java:3687)
05-02 15:19:10.835: W/System.err(4445): at java.lang.reflect.Method.invokeNative(Native Method)
05-02 15:19:10.835: W/System.err(4445): at java.lang.reflect.Method.invoke(Method.java:507)
05-02 15:19:10.835: W/System.err(4445): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
05-02 15:19:10.835: W/System.err(4445): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
05-02 15:19:10.835: W/System.err(4445): at dalvik.system.NativeStart.main(Native Method)
Please help me. How to solve this....