Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kelvinmo/fernet-php
An implementation of the Fernet token specification in PHP.
https://github.com/kelvinmo/fernet-php
fernet php
Last synced: 9 days ago
JSON representation
An implementation of the Fernet token specification in PHP.
- Host: GitHub
- URL: https://github.com/kelvinmo/fernet-php
- Owner: kelvinmo
- License: other
- Created: 2015-01-01T23:32:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-22T07:19:17.000Z (almost 3 years ago)
- Last Synced: 2024-11-13T14:13:09.349Z (about 1 month ago)
- Topics: fernet, php
- Language: PHP
- Homepage:
- Size: 32.2 KB
- Stars: 20
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING.txt
Awesome Lists containing this project
README
# Fernet-PHP
[![Latest Stable Version](https://poser.pugx.org/kelvinmo/fernet-php/v/stable)](https://packagist.org/packages/kelvinmo/fernet-php)
[![Build Status](https://travis-ci.org/kelvinmo/fernet-php.svg?branch=master)](https://travis-ci.org/kelvinmo/fernet-php)Fernet-PHP is an implementation of the [Fernet token specification](https://github.com/fernet/spec/blob/master/Spec.md)
in PHP.## Requirements
- PHP 7.0 or later
- `hash` extension
- `openssl` or `mcrypt` extension
- `mbstring.func_overload` needs to be switched **off** in `php.ini`## Installation
You can install via [Composer](http://getcomposer.org/).
```sh
composer require kelvinmo/fernet-php
```## Usage
```php
encode('string message');$message = $fernet->decode('fernet token');
if ($message === null) {
echo 'Token is not valid';
}?>
```## License
BSD 3 clause