{"id":15308092,"url":"https://github.com/ivantcholakov/gibberish-aes-php","last_synced_at":"2025-11-08T05:04:16.766Z","repository":{"id":2835604,"uuid":"3838632","full_name":"ivantcholakov/gibberish-aes-php","owner":"ivantcholakov","description":"A PHP port of Gibberish AES javascript encryption library, https://github.com/mdp/gibberish-aes","archived":false,"fork":false,"pushed_at":"2021-02-26T23:23:30.000Z","size":60,"stargazers_count":82,"open_issues_count":0,"forks_count":40,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-15T00:54:31.877Z","etag":null,"topics":["php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivantcholakov.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-26T23:45:06.000Z","updated_at":"2024-06-07T06:04:35.000Z","dependencies_parsed_at":"2022-08-26T19:11:20.680Z","dependency_job_id":null,"html_url":"https://github.com/ivantcholakov/gibberish-aes-php","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ivantcholakov/gibberish-aes-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fgibberish-aes-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fgibberish-aes-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fgibberish-aes-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fgibberish-aes-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivantcholakov","download_url":"https://codeload.github.com/ivantcholakov/gibberish-aes-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fgibberish-aes-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951608,"owners_count":23687973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php"],"created_at":"2024-10-01T08:13:51.845Z","updated_at":"2025-11-08T05:04:16.738Z","avatar_url":"https://github.com/ivantcholakov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Gibberish AES, a PHP Implementation\n===================================\n\nSee Gibberish AES javascript encryption library, [https://github.com/mdp/gibberish-aes](https://github.com/mdp/gibberish-aes)\n\nAn important note: The complementary JavaScript project Gibberish AES has been\ndeprecated, see https://github.com/mdp/gibberish-aes/issues/25  \nConsider finding alternative PHP and JavaScript solutions.\n\nThis class is based on initial code proposed by nbari at dalmp dot com\n[http://www.php.net/manual/en/function.openssl-decrypt.php#107210](http://www.php.net/manual/en/function.openssl-decrypt.php#107210)\n\nLive Demo\n---------\n\nhttp://iridadesign.com/starter-public-edition-4/www/playground/gibberish-aes\n\nRequirements:\n-----------------------------------\n\n- OpenSSL functions installed and PHP version \u003e= 5.3.3\n\nor\n\n- Mcrypt functions installed and PHP version \u003c 7.1.0-alpha\n\nFor PHP under version 7 it is recommendable you to install within your project\n\"PHP 5.x support for random_bytes() and random_int()\",\nhttps://github.com/paragonie/random_compat\n\nUsage Example:\n-----------------------------------\n\n```php\necho '\u003cbr /\u003e';\n\n// This is a secret pass-phrase, keep it in a safe place and don't loose it.\n$pass = 'my secret pass-phrase, it should be long';\necho '$pass = '.$pass;\necho '\u003cbr /\u003e';\n// The string to be encrypted.\n$string = 'my secret message';\necho '$string = '.$string;\necho '\u003cbr /\u003e';\necho '\u003cbr /\u003e';\n\n// The default key size is 256 bits.\n$old_key_size = GibberishAES::size();\n\necho 'Encryption and decryption using a 256-bit key:';\necho '\u003cbr /\u003e';\nGibberishAES::size(256);\n// This is the result after encryption of the given string.\n$encrypted_string = GibberishAES::enc($string, $pass);\n// This is the result after decryption of the previously encrypted string.\n// $decrypted_string == $string (should be).\n$decrypted_string = GibberishAES::dec($encrypted_string, $pass);\necho '$encrypted_string = '.$encrypted_string;\necho '\u003cbr /\u003e';\necho '$decrypted_string = '.$decrypted_string;\necho '\u003cbr /\u003e';\necho '\u003cbr /\u003e';\n\necho 'Encryption and decryption using a 192-bit key:';\necho '\u003cbr /\u003e';\nGibberishAES::size(192);\n$encrypted_string = GibberishAES::enc($string, $pass);\n$decrypted_string = GibberishAES::dec($encrypted_string, $pass);\necho '$encrypted_string = '.$encrypted_string;\necho '\u003cbr /\u003e';\necho '$decrypted_string = '.$decrypted_string;\necho '\u003cbr /\u003e';\necho '\u003cbr /\u003e';\n\necho 'Encryption and decryption using a 128-bit key:';\necho '\u003cbr /\u003e';\nGibberishAES::size(128);\n$encrypted_string = GibberishAES::enc($string, $pass);\n$decrypted_string = GibberishAES::dec($encrypted_string, $pass);\necho '$encrypted_string = '.$encrypted_string;\necho '\u003cbr /\u003e';\necho '$decrypted_string = '.$decrypted_string;\necho '\u003cbr /\u003e';\necho '\u003cbr /\u003e';\n\n// Restore the old key size.\nGibberishAES::size($old_key_size);\n```\n\nAuthor: Ivan Tcholakov, 2012-2021.  \nLicense: The MIT License (MIT), [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)\n\nA fragment of code is under the New BSD License, George Argyros, 2012.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fgibberish-aes-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivantcholakov%2Fgibberish-aes-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fgibberish-aes-php/lists"}