serpro/Android-PHP-Encrypt-Decrypt

Problem integrating it on Android

Closed this issue · 7 comments

Hi
When i try to do this:

import com.myproject.MCrypt;

MCrypt mcrypt = new MCrypt();
String decrypting = new String(mcrypt.decrypt(myencryptedtext));

Java ask me to add exception:

        MCrypt mcrypt = new MCrypt();
        try {
            String decrypting = new String(mcrypt.decrypt(myencryptedtext));
            Log.w("decrypting", decrypting );
        } catch (Exception e) {

        }

But nothing returned in the LOGS !

Can you help me please ?

        try {
            String decrypting = new String(mcrypt.decrypt(myencryptedtext));
            Log.w("decrypting", decrypting );
        } catch (Exception e) {
            Log.e("decrypting", e.getMessage());
        }

Already did that sir, but no error message nor the decrypted data shown !

but on your code you don't have anything on catch... are you sure that "Already did that sir, but no error message nor the decrypted data shown !" ?

I added your code there sir ! is what i said:

Log.e("decrypting", e.getMessage());

add a breakpoint then and check again.

Just missed a dot somewhere, thank you for the help, issue solved.

Thanks @MeTaXaS4.

I'm glad your issue is solved @miranos