{"id":21216875,"url":"https://github.com/lablnet/php-encryption","last_synced_at":"2025-07-10T11:32:59.552Z","repository":{"id":57010506,"uuid":"169368362","full_name":"lablnet/PHP-Encryption","owner":"lablnet","description":"Encryption in PHP.","archived":false,"fork":false,"pushed_at":"2021-02-11T04:13:23.000Z","size":27,"stargazers_count":13,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-21T01:59:37.413Z","etag":null,"topics":["classses","decryption","encryption","fastest","free","oop","openssl","php","secured","sodium"],"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/lablnet.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-06T07:15:47.000Z","updated_at":"2023-12-19T21:44:35.000Z","dependencies_parsed_at":"2022-08-21T14:00:38.986Z","dependency_job_id":null,"html_url":"https://github.com/lablnet/PHP-Encryption","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lablnet/PHP-Encryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lablnet","download_url":"https://codeload.github.com/lablnet/PHP-Encryption/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Encryption/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264573267,"owners_count":23630453,"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":["classses","decryption","encryption","fastest","free","oop","openssl","php","secured","sodium"],"created_at":"2024-11-20T21:56:07.563Z","updated_at":"2025-07-10T11:32:59.256Z","avatar_url":"https://github.com/lablnet.png","language":"PHP","readme":"[![Build Status](https://travis-ci.com/Lablnet/PHP-Encryption.svg?branch=master)](https://travis-ci.com/Lablnet/PHP-Encryption)\n[![StyleCI](https://github.styleci.io/repos/169368362/shield?branch=master)](https://github.styleci.io/repos/169368362)\n\n# PHP Encryption\nEncryption in PHP.\n\n## Requirement\n1. PHP 7 (7.3 Recommanded).\n2. Composer.\n3. openSSL php extension.\n4. Sodium php extension for use sodium adapter.\n\n## Insallation\nInstalling this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:\n``` composer require lablnet/encryption ```\n\n\n## Encrypt\nYou can encrypt string by calling to encrypt method\n\n```php \n\u003c?php \nuse Lablnet\\Encryption;\nrequire '../vendor/autoload.php';\n\n$encryption = new Encryption('your-key');\n\n//Encrypt the message\n$encrypt = $encryption-\u003eencrypt(\"This is a text\");\n\necho $encrypt;\n```\n\n### Decrypt\nYou can decrypt token by calling decrypt method \n\n```php \n\u003c?php \nuse Lablnet\\Encryption;\nrequire '../vendor/autoload.php';\n\n$encryption = new Encryption('your-key');\n\n//Decrypt the message\n$decrypt = $encryption-\u003edecrypt($encrypt);\t\necho $decrypt;\n```\n\n### Adapter\nThis Package support two encryption adapter\n- OpenSSL\n- Sodium\n\nDefault openSSL will use,\nyou can use any one you want.\n\n### change Adapter\nYou can pass supported adapter to class like\n\nUse of sodium\n```php \n\u003c?php \nuse Lablnet\\Encryption;\nrequire '../vendor/autoload.php';\n\n$encryption = new Encryption('your-key','sodium');\n```\nUse of openSSL\n```php \n\u003c?php \nuse Lablnet\\Encryption;\nrequire '../vendor/autoload.php';\n\n$encryption = new Encryption('your-key','openssl');\n```\n\n## Contributions  \nThere is still a lot of work to do, so feel free to contribute to open `PR`  \n  \n## License  \nMIT  \n  \n## Support  \nDonate coffee?  \nhere is the bitcoin address  \n[![Balance](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)\n\n   ```37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV```  \n  \nThanks you so much.\n\n## Disclaimer\n**I don't Accept any responsibility for any illegal usage**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flablnet%2Fphp-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-encryption/lists"}