ParagonIE\Halite\Structure\MerkleTree::getRoot PHP Method

getRoot() public method

Get the root hash of this Merkle tree.
public getRoot ( boolean $raw = false ) : string
$raw boolean - Do we want a raw string instead of a hex string?
return string
    public function getRoot(bool $raw = false) : string
    {
        if (!$this->rootCalculated) {
            $this->root = $this->calculateRoot();
        }
        return $raw ? $this->root : \Sodium\bin2hex($this->root);
    }