Recommend this page to a friend!
  Classes of Jose Luis Lucas  >  PHP Hash Blake2  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Hash Blake2
Generate hashes of data using the Blake2 algorithm
Author: By
Last change:
Date: 6 months ago
Size: 944 bytes


Class file image Download


PHP Blake2b,Blake2s,Blake2X


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


$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

@denobisipsis 2021

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