getHash() public method

Get a hash of the data (defaults to hex encoded)
public getHash ( boolean $raw = false, integer $outputSize = Sodium\CRYPTO_GENERICHASH_BYTES, string $personalization = '' ) : string
$raw boolean These two aren't really meant to be used externally:
$outputSize integer
$personalization string
return string
Example #1
0
 public function testHash()
 {
     $stringData = \random_bytes(32);
     $hash = \Sodium\crypto_generichash($stringData);
     $node = new Node($stringData);
     $this->assertSame($stringData, $node->getData());
     $this->assertSame($hash, $node->getHash(true));
 }