PHP Hash Blake2: Generate hashes of data using the Blake2 algorithm

Recommend this page to a friend!
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-01-09 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 34 All time: 10,202 This week: 216Up
Version License PHP version Categories
blake2 1.0.0The PHP License5PHP 5, Cryptography
Description Author

This class can generate hashes of data using the Blake2 algorithm.

It can take a data string and a key and it generates a hash using any of the supported modes Blake2 algorithm like: 2s, 2b and XOF.

The algorithm also takes as parameters a salt value and personalization strings.

Innovation Award
PHP Programming Innovation award nominee
January 2021
Number 12
Blake is a hashing algorithm used to create hash values from sets of data.

The hash values can be used to verify if a given data block was modified during an eventual security attack.

Such security attacks are usually aimed to alter data or programs that could make them work in a dangerous way for the users that receive that data or programs.

This package provides a pure PHP solution to implement the Blake 2 hashing algorithm.

Manuel Lemos
Picture of Jose Luis Lucas
Name: Jose Luis Lucas <contact>
Classes: 10 packages by
Country: Spain Spain
Age: ???
All time rank: 272769 in Spain Spain
Week rank: 110 Up3 in Spain Spain Up
Innovation award
Innovation award
Nominee: 7x

Details

Blake2

PHP Blake2b,Blake2s,Blake2X https://tools.ietf.org/html/rfc7693

https://www.blake2.net/blake2.pdf

https://www.blake2.net/blake2x.pdf

  	

Included BLAKE2s, BLAKE 2b & BLAKE2XOF (modes 2b,2s & XOF 0)

Examples:

$data = ""; $key = ""; $salt = ""; $Personalization = "";

$b2 = new BLAKE2s($key,$salt,$Personalization); echo $b2->hash($data);

$b2 = new BLAKE2b($key,$salt,$Personalization); echo $b2->hash($data);

Extended hashes:

$b2 = new BLAKE2XOF("2s",$key,$salt,$Personalization); echo $b2->hash($data,XOF length);

$b2 = new BLAKE2XOF("2b",$key,$salt,$Personalization); echo $b2->hash($data,XOF length);

$b2 = new BLAKE2XOF("2s",$key,$salt,$Personalization); echo $b2->hash($data,0);

$b2 = new BLAKE2XOF("2b",$key,$salt,$Personalization); echo $b2->hash($data,0);

Test Vectors included

https://github.com/BLAKE2/BLAKE2/tree/master/testvectors

@denobisipsis 2021

  Files folder image Files  
File Role Description
Plain text file blake2.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:34
This week:0
All time:10,202
This week:216Up

For more information send a message to info at phpclasses dot org.