{"id":19858108,"url":"https://github.com/tzsk/crypton","last_synced_at":"2025-05-02T02:30:47.222Z","repository":{"id":34045420,"uuid":"167003474","full_name":"tzsk/crypton","owner":"tzsk","description":"Laravel Request \u0026 Response Encryption","archived":false,"fork":false,"pushed_at":"2023-04-19T20:46:00.000Z","size":408,"stargazers_count":41,"open_issues_count":9,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T03:42:35.544Z","etag":null,"topics":["crypton","laravel-package","request-encryption","response-encryption","secure-api"],"latest_commit_sha":null,"homepage":null,"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/tzsk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tzsk","custom":"https://paypal.me/KMAhmed"}},"created_at":"2019-01-22T13:58:56.000Z","updated_at":"2025-04-17T19:20:36.000Z","dependencies_parsed_at":"2024-11-12T14:22:01.635Z","dependency_job_id":null,"html_url":"https://github.com/tzsk/crypton","commit_stats":{"total_commits":97,"total_committers":3,"mean_commits":"32.333333333333336","dds":"0.17525773195876293","last_synced_commit":"ab4e797c4d6ded3c778ed00313a972c18992c9d2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzsk%2Fcrypton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzsk%2Fcrypton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzsk%2Fcrypton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzsk%2Fcrypton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzsk","download_url":"https://codeload.github.com/tzsk/crypton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972433,"owners_count":21673602,"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":["crypton","laravel-package","request-encryption","response-encryption","secure-api"],"created_at":"2024-11-12T14:21:25.070Z","updated_at":"2025-05-02T02:30:45.745Z","avatar_url":"https://github.com/tzsk.png","language":"PHP","readme":"# :gift: Laravel Crypton\n\n![Crypton Cover Image](resources/crypton.svg)\n\n![GitHub License](https://img.shields.io/github/license/tzsk/crypton?style=for-the-badge)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/tzsk/crypton.svg?style=for-the-badge\u0026logo=composer)](https://packagist.org/packages/tzsk/crypton)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/tzsk/crypton/Tests?label=tests\u0026style=for-the-badge\u0026logo=github)](https://github.com/tzsk/crypton/actions?query=workflow%3ATests+branch%3Amaster)\n[![Total Downloads](https://img.shields.io/packagist/dt/tzsk/crypton.svg?style=for-the-badge\u0026logo=laravel)](https://packagist.org/packages/tzsk/crypton)\n\n\nTThis is a simple package for laravel to encrypt decrypt api request \u0026 response in both ends, Backend \u0026 Javascript.\n\n## :package: Installation\n\nVia Composer\n\n``` bash\n$ composer require tzsk/crypton\n```\n\nPublish config file\n\n```bash\n$ php artisan crypton:publish\n```\n\nAdd an environment variable in the `.env` file\n\n```env\nCRYPTON_KEY=your-encryption-key\n```\n\n## :eyes: Keep in Mind\n\n\u003e **TIP:** You can easily generate an encryption key by running `php artisan key:generate` then copy the generated key. Then again run: `php artisan key:generate` to make the key used by crypton and the default application key different.\n\n**WARNING: DO NOT USE THE SAME `APP_KEY` AND `CRYPTON_KEY`**\n\n## :fire: Usage\n\nStart off by adding a Middleware in the `app/Http/Kernel.php` file.\n\n```php\n$routeMiddleware = [\n    'crypton' =\u003e \\Tzsk\\Crypton\\Middleware\\EncryptRequestResponse::class,\n];\n```\n\nNow, add this middleware to any api routes or groups.\n\nExample:\n\n```php\nRoute::middleware('crypton')-\u003epost('some-endpoint', function(Request $request) {\n    return Post::paginate($request-\u003eper_page ? : 10);\n});\n```\n\nThat's it.\n\n### :heart_eyes: Javascript adapter\n\n[See Laravel Crypton](https://github.com/tzsk/laravel-crypton)\n\n## :microscope: Testing\n\n``` bash\ncomposer test\n```\n\n## :date: Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## :crown: Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## :lock: Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## :heart: Credits\n\n- [Kazi Ahmed](https://github.com/tzsk)\n- [All Contributors](../../contributors)\n\n## :policeman: License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":["https://github.com/sponsors/tzsk","https://paypal.me/KMAhmed"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzsk%2Fcrypton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzsk%2Fcrypton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzsk%2Fcrypton/lists"}