{"id":13462460,"url":"https://github.com/defuse/php-encryption","last_synced_at":"2025-05-12T15:16:58.537Z","repository":{"id":13873068,"uuid":"16571051","full_name":"defuse/php-encryption","owner":"defuse","description":"Simple Encryption in PHP.","archived":false,"fork":false,"pushed_at":"2024-01-02T15:04:49.000Z","size":13471,"stargazers_count":3828,"open_issues_count":10,"forks_count":311,"subscribers_count":103,"default_branch":"master","last_synced_at":"2025-04-22T05:13:11.883Z","etag":null,"topics":[],"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/defuse.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-06T06:47:32.000Z","updated_at":"2025-04-15T06:21:14.000Z","dependencies_parsed_at":"2022-08-03T06:01:32.552Z","dependency_job_id":"5d48be78-918c-433b-bd4c-42d35e7703d0","html_url":"https://github.com/defuse/php-encryption","commit_stats":{"total_commits":540,"total_committers":40,"mean_commits":13.5,"dds":0.5277777777777778,"last_synced_commit":"90060874f868d0711890e67456b4f26930fc478f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuse%2Fphp-encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuse%2Fphp-encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuse%2Fphp-encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuse%2Fphp-encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defuse","download_url":"https://codeload.github.com/defuse/php-encryption/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477812,"owners_count":21437049,"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":[],"created_at":"2024-07-31T12:00:48.357Z","updated_at":"2025-04-23T17:10:59.551Z","avatar_url":"https://github.com/defuse.png","language":"PHP","readme":"php-encryption\n===============\n\n![Build Status](https://app.travis-ci.com/defuse/php-encryption.svg?branch=master)\n[![codecov](https://codecov.io/gh/defuse/php-encryption/branch/master/graph/badge.svg)](https://codecov.io/gh/defuse/php-encryption)\n[![Latest Stable Version](https://poser.pugx.org/defuse/php-encryption/v/stable)](https://packagist.org/packages/defuse/php-encryption)\n[![License](https://poser.pugx.org/defuse/php-encryption/license)](https://packagist.org/packages/defuse/php-encryption)\n[![Downloads](https://img.shields.io/packagist/dt/defuse/php-encryption.svg)](https://packagist.org/packages/defuse/php-encryption)\n\n```terminal\ncomposer require defuse/php-encryption\n```\n\nThis is a library for encrypting data with a key or password in PHP. **It\nrequires PHP 5.6 or newer and OpenSSL 1.0.1 or newer.** We recommend using a\nversion of PHP that [still has security\nsupport](https://www.php.net/supported-versions.php), which at the time of\nwriting means PHP 8.0 or later. Using this library with an unsupported\nversion of PHP could lead to security vulnerabilities.\n\nThe current version of `php-encryption` is v2.4.0. This library is expected to\nremain stable and supported by its authors with security and bugfixes until at\nleast January 1st, 2024.\n\nThe library is a joint effort between [Taylor Hornby](https://defuse.ca/) and\n[Scott Arciszewski](https://paragonie.com/blog/author/scott-arcizewski) as well\nas numerous open-source contributors.\n\nWhat separates this library from other PHP encryption libraries is, firstly,\nthat it is secure. The authors used to encounter insecure PHP encryption code on\na daily basis, so they created this library to bring more security to the\necosystem. Secondly, this library is \"difficult to misuse.\" Like\n[libsodium](https://github.com/jedisct1/libsodium), its API is designed to be\neasy to use in a secure way and hard to use in an insecure way.\n\n\nDependencies\n------------\n\nThis library requires no special dependencies except for PHP 5.6 or newer with\nthe OpenSSL extensions (version 1.0.1 or later) enabled (this is the default).\nIt uses [random\\_compat](https://github.com/paragonie/random_compat), which is\nbundled in with this library so that your users will not need to follow any\nspecial installation steps.\n\nGetting Started\n----------------\n\nStart with the [**Tutorial**](docs/Tutorial.md). You can find instructions for\nobtaining this library's code securely in the [Installing and\nVerifying](docs/InstallingAndVerifying.md) documentation.\n\nAfter you've read the tutorial and got the code, refer to the formal\ndocumentation for each of the classes this library provides:\n\n- [Crypto](docs/classes/Crypto.md)\n- [File](docs/classes/File.md)\n- [Key](docs/classes/Key.md)\n- [KeyProtectedByPassword](docs/classes/KeyProtectedByPassword.md)\n\nIf you encounter difficulties, see the [FAQ](docs/FAQ.md) answers. The fixes to\nthe most commonly-reported problems are explained there.\n\nIf you're a cryptographer and want to understand the nitty-gritty details of how\nthis library works, look at the [Cryptography Details](docs/CryptoDetails.md)\ndocumentation.\n\nIf you're interested in contributing to this library, see the [Internal\nDeveloper Documentation](docs/InternalDeveloperDocs.md).\n\nOther Language Support\n----------------------\n\nThis library is intended for server-side PHP software that needs to encrypt data at rest.\nIf you are building software that needs to encrypt client-side, or building a system that\nrequires cross-platform encryption/decryption support, we strongly recommend using\n[libsodium](https://download.libsodium.org/doc/bindings_for_other_languages) instead.\n\nExamples\n---------\n\nIf the documentation is not enough for you to understand how to use this\nlibrary, then you can look at an example project that uses this library:\n\n- [encutil](https://github.com/defuse/encutil)\n- [fileencrypt](https://github.com/tsusanka/fileencrypt)\n\nSecurity Audit Status\n---------------------\n\nThis code has not been subjected to a formal, paid, security audit. However, it\nhas received lots of review from members of the PHP security community, and the\nauthors are experienced with cryptography. In all likelihood, you are safer\nusing this library than almost any other encryption library for PHP.\n\nIf you use this library as a part of your business and would like to help fund\na formal audit, please [contact Taylor Hornby](https://defuse.ca/contact.htm).\n\nPublic Keys\n------------\n\nThe GnuPG public key used to sign the current and new releases is available in\n[dist/signingkey-new.asc](https://github.com/defuse/php-encryption/raw/master/dist/signingkey-new.asc). Its fingerprint is:\n\n```\n6DD6 E677 0281 5846 FC85  25A3 DD2E 507F 7BDB 1669\n```\n\nYou can verify it against Taylor Hornby's [contact\npage](https://defuse.ca/contact.htm) and\n[twitter](https://twitter.com/DefuseSec/status/1670840796743081984).\n\nOlder releases were signed with a (now-expired) available in\n[dist/signingkey-old.asc](https://github.com/defuse/php-encryption/raw/master/dist/signingkey-old.asc). The old key's fingerprint is:\n\n```\n2FA6 1D8D 99B9 2658 6BAC  3D53 385E E055 A129 1538\n```\n\nThe old key's fingerprint can be verified against Taylor Hornby's [contact page](https://defuse.ca/contact.htm) and\n[twitter](https://twitter.com/DefuseSec/status/723741424253059074).\n\nA signature of this new key by the old key is available in\n[dist/signingkey-new.asc.sig](https://github.com/defuse/php-encryption/raw/master/dist/signingkey-new.asc.sig).\n","funding_links":[],"categories":["Uncategorized","PHP","Frameworks and Libs","Table of Contents","目录","安全 Security","安全( Security )","类库"],"sub_categories":["Uncategorized","PHP","Security","安全 Security","加密/解密"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuse%2Fphp-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefuse%2Fphp-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuse%2Fphp-encryption/lists"}