PHP Class ParagonIE\Halite\Structure\Node

This library makes heavy use of return-type declarations, which are a PHP 7 only feature. Read more about them here:
Show file Open project: paragonie/halite Class Usage Examples

Public Methods

Method Description
__construct ( string $data ) Node constructor.
getData ( ) : string Get the data
getExpandedNode ( string $concat ) : Node Nodes are immutable, but you can create one with extra data.
getHash ( boolean $raw = false, integer $outputSize = Sodium\CRYPTO_GENERICHASH_BYTES, string $personalization = '' ) : string Get a hash of the data (defaults to hex encoded)

Method Details

__construct() public method

Node constructor.
public __construct ( string $data )
$data string

getData() public method

Get the data
public getData ( ) : string
return string

getExpandedNode() public method

Nodes are immutable, but you can create one with extra data.
public getExpandedNode ( string $concat ) : Node
$concat string
return Node

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