{"id":22922807,"url":"https://github.com/kelvinmo/fernet-php","last_synced_at":"2025-05-12T23:12:56.310Z","repository":{"id":25272930,"uuid":"28698454","full_name":"kelvinmo/fernet-php","owner":"kelvinmo","description":"An implementation of the Fernet token specification in PHP.","archived":false,"fork":false,"pushed_at":"2022-02-22T07:19:17.000Z","size":33,"stargazers_count":21,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T23:08:04.684Z","etag":null,"topics":["fernet","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kelvinmo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-01T23:32:56.000Z","updated_at":"2025-03-12T21:13:49.000Z","dependencies_parsed_at":"2022-07-27T05:02:27.554Z","dependency_job_id":null,"html_url":"https://github.com/kelvinmo/fernet-php","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvinmo%2Ffernet-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvinmo%2Ffernet-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvinmo%2Ffernet-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvinmo%2Ffernet-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvinmo","download_url":"https://codeload.github.com/kelvinmo/fernet-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837463,"owners_count":21971984,"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":["fernet","php"],"created_at":"2024-12-14T08:13:10.796Z","updated_at":"2025-05-12T23:12:56.290Z","avatar_url":"https://github.com/kelvinmo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fernet-PHP\n\n[![Latest Stable Version](https://poser.pugx.org/kelvinmo/fernet-php/v/stable)](https://packagist.org/packages/kelvinmo/fernet-php)\n[![Build Status](https://travis-ci.org/kelvinmo/fernet-php.svg?branch=master)](https://travis-ci.org/kelvinmo/fernet-php)\n\nFernet-PHP is an implementation of the [Fernet token specification](https://github.com/fernet/spec/blob/master/Spec.md)\nin PHP.\n\n## Requirements\n\n- PHP 7.0 or later\n- `hash` extension\n- `openssl` or `mcrypt` extension\n- `mbstring.func_overload` needs to be switched **off** in `php.ini`\n\n## Installation\n\nYou can install via [Composer](http://getcomposer.org/).\n\n```sh\ncomposer require kelvinmo/fernet-php\n```\n\n## Usage\n\n```php\n\u003c?php\nrequire 'vendor/autoload.php';\n\nuse Fernet\\Fernet;\n\n$key = '[Base64url encoded fernet key]';\n$fernet = new Fernet($key);\n\n$token = $fernet-\u003eencode('string message');\n\n$message = $fernet-\u003edecode('fernet token');\nif ($message === null) {\n    echo 'Token is not valid';\n}\n\n?\u003e\n```\n\n## License\n\nBSD 3 clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvinmo%2Ffernet-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvinmo%2Ffernet-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvinmo%2Ffernet-php/lists"}