https://github.com/deemru/blake2b
BLAKE2 hash function on pure PHP
https://github.com/deemru/blake2b
blake2 blake2b hash php wavesplatform
Last synced: 12 months ago
JSON representation
BLAKE2 hash function on pure PHP
- Host: GitHub
- URL: https://github.com/deemru/blake2b
- Owner: deemru
- License: mit
- Created: 2019-02-02T14:58:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T21:03:32.000Z (almost 7 years ago)
- Last Synced: 2025-03-20T13:06:31.989Z (about 1 year ago)
- Topics: blake2, blake2b, hash, php, wavesplatform
- Language: PHP
- Homepage: https://packagist.org/packages/deemru/blake2b
- Size: 158 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blake2b
[](https://packagist.org/packages/deemru/blake2b) [](https://packagist.org/packages/deemru/blake2b) [](https://travis-ci.org/deemru/Blake2b) [](https://app.codacy.com/project/deemru/Blake2b/dashboard) [](https://packagist.org/packages/deemru/blake2b)
[Blake2b](https://github.com/deemru/Blake2b) implements [BLAKE2](https://en.wikipedia.org/wiki/BLAKE_(hash_function)) hash function on pure PHP.
- Cryptographically compatible Blake2b
- If you have PHP >= 7.2 with [Sodium](http://php.net/manual/en/book.sodium.php), please use [`sodium_crypto_generichash()`](http://php.net/manual/en/function.sodium-crypto-generichash.php)
## Usage
```php
$blake2b = new Blake2b();
$hash = $blake2b->hash( 'Hello, world!' );
if( $hash !== hex2bin( 'b5da441cfe72ae042ef4d2b17742907f675de4da57462d4c3609c2e2ed755970' ) )
exit( 1 );
```
## Requirements
- [PHP](http://php.net) >= 5.4
## Installation
Require through Composer:
```json
{
"require": {
"deemru/blake2b": "1.0.*"
}
}
```