serpro / Android-PHP-Encrypt-Decrypt

Encrypt / Decrypt Between Android and PHP and vice-versa
155 stars 74 forks source link

Problem integrating it on Android #19

Closed miranos closed 7 years ago

miranos commented 7 years ago

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 ?

GMetaxakis commented 7 years ago
        try {
            String decrypting = new String(mcrypt.decrypt(myencryptedtext));
            Log.w("decrypting", decrypting );
        } catch (Exception e) {
            Log.e("decrypting", e.getMessage());
        }
miranos commented 7 years ago

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

GMetaxakis commented 7 years ago

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 !" ?

miranos commented 7 years ago

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

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

GMetaxakis commented 7 years ago

add a breakpoint then and check again.

miranos commented 7 years ago

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

serpro commented 7 years ago

Thanks @MeTaXaS4.

I'm glad your issue is solved @miranos