serpro / Android-PHP-Encrypt-Decrypt

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

Android MCrypt decode Invalid int #13

Closed omatt closed 8 years ago

omatt commented 8 years ago

Currently testing encrypt-decrypt functions for Android side.

Plain text is "You should be able to read this, bro." iv = 483e705e5a7f270f; secretKey = 53c7a330f1bf93d6;

encrypt output is "j:Xg֎ �T;�H��ZA����7�(�yJ1$([d{�$�����ûD" decrypt gives out an error: java.lang.Exception: [decrypt] Invalid int: "j:"

MythodeaLoL commented 8 years ago

try

iv = "483e705e5a7f270f";
secretKey = "53c7a330f1bf93d6";
omatt commented 8 years ago

Those are the same values. iv and secretKey are String.

omatt commented 8 years ago

fixed it by using bytesToHex