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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-01-23 (8 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 32 All time: 10,267 This week: 208Up
Version License PHP version Categories
blake3 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 of the Blake3 algorithm.

Currently it supports hashing modes like: HASH, KEYED and DERIVE with XOF output.

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 3 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: 269869 in Spain Spain
Week rank: 124 Up4 in Spain Spain Up
Innovation award
Innovation award
Nominee: 7x

Details

Blake3

PHP Blake3 hash,keyed_hash,derive_key,XOF PHP implementation of BLAKE3

https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf

https://github.com/BLAKE3-team/BLAKE3

It supports HASH, KEYED and DERIVE modes with XOF output

There is a python version https://github.com/oconnor663/bao

which is 2.5x slower than this implementation in generating the hash

This implementation have been checked with the test vectors provided

https://raw.githubusercontent.com/BLAKE3-team/BLAKE3/master/test_vectors/test_vectors.json

By default, XOF output are 32 bytes

Examples of use:

HASH MODE

	$b2 = new BLAKE3();		
	$hash = $b2->hash($h,$xof_length);

KEYED HASH

					
	$b2 = new BLAKE3($key);		
	$keyed_hash = $b2->hash($h,$xof_length);

DERIVE KEY

	$b2 = new BLAKE3();		
	$derive_key = $b2->derivekey($context_key,$context,$xof_length);
	

@denobisipsis 2021

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:32
This week:0
All time:10,267
This week:208Up
For more information send a message to info at phpclasses dot org.