{"id":17077974,"url":"https://github.com/arzzen/php-time-lock-encryption","last_synced_at":"2025-11-03T19:44:17.976Z","repository":{"id":32732226,"uuid":"36322408","full_name":"arzzen/php-time-lock-encryption","owner":"arzzen","description":"Time Lock Encryption Class","archived":false,"fork":false,"pushed_at":"2020-02-05T09:23:27.000Z","size":21,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-21T13:12:49.463Z","etag":null,"topics":["decryption","encrypted-data","encryption","fernet","iteration","lock-encryption","period","php"],"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/arzzen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"arzzen"}},"created_at":"2015-05-26T20:38:36.000Z","updated_at":"2023-10-30T13:52:14.000Z","dependencies_parsed_at":"2022-09-12T19:51:05.369Z","dependency_job_id":null,"html_url":"https://github.com/arzzen/php-time-lock-encryption","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzzen%2Fphp-time-lock-encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzzen%2Fphp-time-lock-encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzzen%2Fphp-time-lock-encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzzen%2Fphp-time-lock-encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arzzen","download_url":"https://codeload.github.com/arzzen/php-time-lock-encryption/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248626905,"owners_count":21135758,"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":["decryption","encrypted-data","encryption","fernet","iteration","lock-encryption","period","php"],"created_at":"2024-10-14T12:18:22.712Z","updated_at":"2025-11-03T19:44:17.934Z","avatar_url":"https://github.com/arzzen.png","language":"PHP","funding_links":["https://github.com/sponsors/arzzen"],"categories":[],"sub_categories":[],"readme":"# Time Lock Encryption Class [![Build Status](https://travis-ci.org/arzzen/php-time-lock-encryption.svg)](https://travis-ci.org/arzzen/php-time-lock-encryption) [![Latest Stable Version](https://poser.pugx.org/arzzen/php-time-lock-encryption/version)](https://packagist.org/packages/arzzen/php-time-lock-encryption) [![License](https://poser.pugx.org/arzzen/php-time-lock-encryption/license)](https://packagist.org/packages/arzzen/php-time-lock-encryption)\n\nImplementation of timed-release crypto.\n\nThis class can encrypt data using key generated for a time period.\n\nIt takes an expression that defines a given time period and generates a key by creating iteratively hashes of the initial key in a cycle until the specified time as passed.\n\nThe class returns the encrypted data using the Fernet class with the generated key.\n\nIt can also decrypt previously encrypted data by regenerating the encryption key the same number of iterations that it were used to generate the key when the data was encrypted.\n\n\n### Requirements\n\n* PHP 5.3.3 or later\n* hash extension\n* openssl or mcrypt extension\n\n\n## Installation\n\nYou can install this library by using [Composer]. You can also view more info\nabout this on [Packagist].\n\nAdd this to the `require` section in your `composer.json` file.\n\n```json\n{\n    \"require\": {\n        \"arzzen/php-time-lock-encryption\": \"1.1.*\"\n    }\n}\n```\n\n\n### Usage\n\n```php\n\u003c?php\nuse TimeLockCrypt;\n\n$timeLock = new TimeLockCrypt('keyseed');\n\n$message = 'secret message';\n$encrypted = $timeLock-\u003eencrypt('+10 second', $message);\n$iterations = $timeLock-\u003egetIterations();\n\n$decrypted = $timeLock-\u003edecrypt($encrypted, $iterations);\n\nvar_dump($message == $decrypted);\n?\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farzzen%2Fphp-time-lock-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farzzen%2Fphp-time-lock-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farzzen%2Fphp-time-lock-encryption/lists"}