public function hash($algo = 'sha1')
    {
        $algos = new ArrayObject(hash_algos());
        if (!$algos->inArray($algo)) {
            throw new StringObjectException(StringObjectException::MSG_INVALID_HASH_ALGO, [$algo]);
        }

        $this->val(hash($algo, $this->val()));

        return $this;
    }