summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2012-03-27 04:38:31 +0300
committerIvan Tcholakov <ivantcholakov@gmail.com>2012-03-27 04:38:31 +0300
commit1fa5284885b0ea41c47d18191dcfae2dba3fdc26 (patch)
treedf28046540260f31c8eb8da02ff84ef545cc8ce0
parent7d069ab97155b7d861f46aa49bb01a6bd38d3176 (diff)
downloadgibberish-aes-php-1fa5284885b0ea41c47d18191dcfae2dba3fdc26.zip
gibberish-aes-php-1fa5284885b0ea41c47d18191dcfae2dba3fdc26.tar.gz
gibberish-aes-php-1fa5284885b0ea41c47d18191dcfae2dba3fdc26.tar.bz2
Adding README file.
-rw-r--r--README.markdown31
1 files changed, 31 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 0000000..fe6b9ab
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,31 @@
+
+Gibberish AES, a PHP Implementation
+===================================
+
+See Gibberish AES javascript encryption library, [https://github.com/mdp/gibberish-aes](https://github.com/mdp/gibberish-aes)
+
+This class is based on initial code proposed by nbari at dalmp dot com
+[http://www.php.net/manual/en/function.openssl-decrypt.php#107210](http://www.php.net/manual/en/function.openssl-decrypt.php#107210)
+
+Requirements:
+-----------------------------------
+
+OpenSSL functions installed and PHP version >= 5.3.3 (preferred case)
+or
+Mcrypt functions installed.
+
+Usage:
+-----------------------------------
+
+ // This is a secret key, keep it in a safe place and don't loose it.
+ $key = 'my secret key';
+ // The string to be encrypted.
+ $string = 'my secret message';
+ // This is the result after encryption of the given string.
+ $encrypted_string = GibberishAES::enc($string, $key);
+ // This is the result after decryption of the previously encrypted string.
+ // $decrypted_string == $string (should be).
+ $decrypted_string = GibberishAES::dec($encrypted_string, $key);
+
+Author: Ivan Tcholakov <ivantcholakov@gmail.com>, 2012.
+License: Open Software License ("OSL") v 3.0, [http://www.opensource.org/licenses/OSL-3.0](http://www.opensource.org/licenses/OSL-3.0)