Skip to content
Encrypt / Decrypt Between Android and PHP and vice-versa
Java PHP
Find file
Latest commit 4d7af36 May 16, 2014 @serpro Merge pull request #8 from poul-kg/master
 * added support for encrypting / decrypting binary files, preserving backward compatibility

README.md

Android-PHP-Encrypt-Decrypt

Encrypt / Decrypt Between Android and PHP and vice-versa

HOW TO USE IT (JAVA)

MCrypt mcrypt = new MCrypt();

/* Encrypt */

String encrypted = MCrypt.bytesToHex( mcrypt.encrypt("Text to Encrypt") );

/* Decrypt */

String decrypted = new String( mcrypt.decrypt( encrypted ) );

HOW TO USE IT (PHP)

$mcrypt = new MCrypt();

/* Encrypt */

$encrypted = $mcrypt->encrypt("Text to encrypt");

/* Decrypt */

$decrypted = $mcrypt->decrypt($encrypted);

Something went wrong with that request. Please try again.