Skip to content
This repository

Encrypt / Decrypt Between Android and PHP and vice-versa

branch: master

Merge pull request #4 from SeRPRo/issue-3

Removed trailing zeroes on decrypt
latest commit 80d099f8ad
Sergio Lopez authored
Octocat-spinner-32 Java Removed trailing zeroes on decrypt June 27, 2013
Octocat-spinner-32 PHP Fix special characters April 12, 2013
Octocat-spinner-32 README.md Update README.md September 06, 2012
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.