Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Encrypt / Decrypt Between Android and PHP and vice-versa
Java PHP
branch: master

Merge pull request #8 from poul-kg/master

 * added support for encrypting / decrypting binary files, preserving backward compatibility
latest commit 4d7af36f0b
@serpro authored

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.