https://github.com/lookyman/security
Wraps PHP's password_* functions in authenticated encryption
https://github.com/lookyman/security
encryption password security
Last synced: 16 days ago
JSON representation
Wraps PHP's password_* functions in authenticated encryption
- Host: GitHub
- URL: https://github.com/lookyman/security
- Owner: lookyman
- License: mit
- Created: 2016-08-10T12:35:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-31T18:30:08.000Z (almost 10 years ago)
- Last Synced: 2025-02-23T14:31:00.670Z (over 1 year ago)
- Topics: encryption, password, security
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Lookyman/Security
==========================
Wraps PHP's password_* functions in authenticated encryption.
[](https://travis-ci.org/lookyman/security)
[](https://scrutinizer-ci.com/g/lookyman/security/?branch=master)
[](https://coveralls.io/github/lookyman/security?branch=master)
[](https://packagist.org/packages/lookyman/security)
[](https://packagist.org/packages/lookyman/security)
Installation
------------
```sh
composer require lookyman/security
```
Usage
-----
```php
$key = \Defuse\Crypto\Key::createNewRandomKey();
$hash = \Lookyman\Security\Passwords::hash('abc123', $key);
echo \Lookyman\Security\Passwords::verify('abc123', $hash, $key) ? 'success' : 'failure';
```