src/Glacier/TreeHash.php
public function addChecksum($checksum, $inBinaryForm = false)
    {
        // Error if hash is already calculated
        if ($this->hash) {
            throw new \LogicException('You may not add more checksums to a '
                . 'complete tree hash.');
        }

        // Convert the checksum to binary form if necessary
        $this->checksums[] = $inBinaryForm ? $checksum : hex2bin($checksum);

        return $this;
    }
public function addChecksum($checksum, $inBinaryForm = false)
    {
        // Error if hash is already calculated
        if ($this->hash) {
            throw new \LogicException('You may not add more checksums to a '
                . 'complete tree hash.');
        }

        // Convert the checksum to binary form if necessary
        $this->checksums[] = $inBinaryForm ? $checksum : hex2bin($checksum);

        return $this;
    }
public function addChecksum ( $ checksum , $ inBinaryForm = false ) { // Error if hash is already calculated if ( $ this -> hash ) { throw new \ LogicException ( 'You may not add more checksums to a ' . 'complete tree hash.' ) ; } // Convert the checksum to binary form if necessary $ this -> checksums [ ] = $ inBinaryForm ? $ checksum : hex2bin ( $ checksum ) ; return $ this ; }
Add a checksum to the tree hash directly

@param string $checksum   The checksum to add
@param bool $inBinaryForm TRUE if checksum is in binary form

@return self
@throws \LogicException if the root tree hash is already calculated
Add a checksum to the tree hash directly