static public function hash($algorithm, $data, $raw_output = false)
    {
        $hashBits = self::getHashBitLength($algorithm);
        return Keccak::hash($data, (int) $hashBits, (bool) $raw_output);
    }