public static function decrypt(string $input, string $method, string $key, string $iv, string $tag): string
    {
        if (OpensslStatic::tagRequired($method)) {
            $ret = \openssl_decrypt($input, $method, $key, OPENSSL_RAW_DATA, $iv, $tag, '');
        } else {
            $ret = \openssl_decrypt($input, $method, $key, OPENSSL_RAW_DATA, $iv);
        }

        return self::returnOrException($ret);
    }