{"id":17984127,"url":"https://github.com/bcrowe/cakephp-encrypted-type","last_synced_at":"2026-03-08T05:31:43.325Z","repository":{"id":55489972,"uuid":"102881692","full_name":"bcrowe/cakephp-encrypted-type","owner":"bcrowe","description":":lock_with_ink_pen: CakePHP plugin that provides field-level (column) encryption within the application layer before data is stored or transmitted to the database, supporting regulatory compliance, zero-trust security, end-to-end encryption, and contextual awareness.","archived":false,"fork":false,"pushed_at":"2021-01-19T17:45:26.000Z","size":22,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-27T14:43:11.487Z","etag":null,"topics":["cakephp","cakephp-plugin","data-encryption","data-security","database","encryption","end-to-end-encryption","field-level-encryption","field-level-security","gdpr","hipaa","pci","pci-compliance","pci-dss","php","regulatory-compliance","security","zero-trust","zero-trust-security"],"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/bcrowe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-08T16:25:02.000Z","updated_at":"2024-11-12T04:51:15.000Z","dependencies_parsed_at":"2022-08-15T01:31:16.342Z","dependency_job_id":null,"html_url":"https://github.com/bcrowe/cakephp-encrypted-type","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bcrowe/cakephp-encrypted-type","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fcakephp-encrypted-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fcakephp-encrypted-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fcakephp-encrypted-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fcakephp-encrypted-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcrowe","download_url":"https://codeload.github.com/bcrowe/cakephp-encrypted-type/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcrowe%2Fcakephp-encrypted-type/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cakephp","cakephp-plugin","data-encryption","data-security","database","encryption","end-to-end-encryption","field-level-encryption","field-level-security","gdpr","hipaa","pci","pci-compliance","pci-dss","php","regulatory-compliance","security","zero-trust","zero-trust-security"],"created_at":"2024-10-29T18:19:33.441Z","updated_at":"2026-03-08T05:31:43.305Z","avatar_url":"https://github.com/bcrowe.png","language":"PHP","readme":"# CakePHP Encrypted Type\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Coverage Status][ico-scrutinizer]][link-scrutinizer]\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis plugin provides a CakePHP 4 encrypted database type for application-level\nencryption. Before using this plugin you may want to weigh your options\nbetween [full-disk, database-level, and application-level encryption](https://www.percona.com/blog/2016/04/08/mysql-data-at-rest-encryption/).\nThis plugin was born out of Amazon Aurora not supporting encryption with cross\nregion replication before [March 28, 2017](https://aws.amazon.com/blogs/aws/amazon-aurora-update-more-cross-region-cross-account-support-t2-small-db-instances-another-region/).\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require bcrowe/cakephp-encrypted-type\n```\n\nLoad the plugin in your application's `bootstrap.php` file, then define the type\nmapping:\n\n``` php\nPlugin::load('BryanCrowe/EncryptedType');\nType::map('encrypted', 'BryanCrowe\\EncryptedType\\Database\\Type\\EncryptedType');\n```\n\nMake sure to have a `Encryption.key` config value in your `config/app.php` file:\n\n``` php\n[\n    'Encryption' =\u003e [\n        'key' =\u003e env('ENCRYPTION_KEY', 'defaultencryptionkeygoesrighthereyaythisisfun'),\n    ],\n]\n```\n\n## Usage\n\n**Note:** This database type expects columns to be nullable in the case of an\nomitted column or whenever explicitly setting a `null` value for a column.\n\nUse `BLOB` types for columns that are to be encrypted, for example:\n\n``` sql\nCREATE TABLE `users` (\n  `id` char(36) NOT NULL DEFAULT '',\n  `first_name` blob,\n  `last_name` blob,\n  `email` blob,\n  `created` datetime DEFAULT NULL,\n  `modified` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n```\n\n[Map the type](https://book.cakephp.org/3.0/en/orm/database-basics.html#data-types)\nto a column in your Table class:\n\n``` php\n\u003c?php\nnamespace App\\Model\\Table;\n\nuse Cake\\Database\\Schema\\TableSchema;\nuse Cake\\ORM\\Table;\n\nclass UsersTable extends Table\n{\n\n    protected function _initializeSchema(TableSchema $schema)\n    {\n        $schema-\u003ecolumnType('first_name', 'encrypted');\n        $schema-\u003ecolumnType('last_name', 'encrypted');\n        $schema-\u003ecolumnType('email', 'encrypted');\n\n        return $schema;\n    }\n}\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed\nrecently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for\ndetails.\n\n## Security\n\nIf you discover any security related issues, please email bryan@bryan-crowe.com\ninstead of using the issue tracker.\n\n## Credits\n\n- [Bryan Crowe][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more\ninformation.\n\n[ico-version]: https://img.shields.io/packagist/v/bcrowe/cakephp-encrypted-type.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/bcrowe/cakephp-encrypted-type/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/bcrowe/cakephp-encrypted-type.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/bcrowe/cakephp-encrypted-type.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/bcrowe/cakephp-encrypted-type.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/bcrowe/cakephp-encrypted-type\n[link-travis]: https://travis-ci.org/bcrowe/cakephp-encrypted-type\n[link-scrutinizer]: https://scrutinizer-ci.com/g/bcrowe/cakephp-encrypted-type/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/bcrowe/cakephp-encrypted-type\n[link-downloads]: https://packagist.org/packages/bcrowe/cakephp-encrypted-type\n[link-author]: https://github.com/bcrowe\n[link-contributors]: ../../contributors\n","funding_links":[],"categories":["Security"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcrowe%2Fcakephp-encrypted-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcrowe%2Fcakephp-encrypted-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcrowe%2Fcakephp-encrypted-type/lists"}