denobisipsis / Blake3

PHP Blake3 hash,keyed_hash,derive_key,XOF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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

About

PHP Blake3 hash,keyed_hash,derive_key,XOF


Languages

Language:PHP 64.9%Language:Zephir 35.1%