public static function generateKey($length = Constants::GENERICHASH_KEYBYTES)
    {
        # Test the length for validity.
        Helpers::rangeCheck($length, Constants::GENERICHASH_KEYBYTES_MAX, Constants::GENERICHASH_KEYBYTES_MIN, 'Hash', 'generateKey');

        # Return the hash to the client.
        return self::hash(Entropy::bytes($length), '', $length);
    }