根据以下js代码构造签名函数 306: function(e, t, n) { "use strict"; Object.defineProperty(t,…
- User
根据以下js代码构造签名函数 306: function(e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, r = function(e) { return e && e.__esModule ? e : { default: e } }(n(307)), a = function() { for (var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 32, t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678", n = t.length, o = "", r = 0; r < e; r += 1) o += t.charAt(Math.floor(Math.random() * n)); return o }, i = function(e) { var t = void 0 === (t = (e = function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var n = [], o = !0, r = !1, a = void 0; try { for (var i, u = eSymbol.iterator; !(o = (i = u.next()).done) && (n.push(i.value), !t || n.length !== t); o = !0); } catch (e) { r = !0, a = e } finally { try { !o && u.return && u.return() } finally { if (r) throw a } } return n }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") }(e, 2))[0]) ? "" : t, n = e = void 0 === (e = e[1]) ? "" : e; return null !== e && "object" === (void 0 === e ? "undefined" : o(e)) ? n = JSON.stringify(e) : void 0 === n && (n = ""), encodeURIComponent(t) + "=" + encodeURIComponent(n) }; t.default = function(e, t) { t = { accessKeyId: t.id, accessKeySecret: t.secret, nonce: a(32), timestamp: Math.ceil((new Date).getTime() / 1e3) }; var n = e.query ? "&query=" + function(e) { return (e = Object.entries(e).map(i)).sort(), e.join("&").replace(/'/g, "%27") }(e.query) : "", o = e.uri.split("//")[1].split("/")[0], u = e.uri.split("?")[0].split("//")[1].replace(o, ""); return e = function(e, t) { return function(e) { for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = "", o = 0, r = 0, a = 0; a < e.length; ++a) o = o << 4 | ("A" <= e[a] && e[a] <= "Z" ? e.charCodeAt(a) - 55 : "a" <= e[a] && e[a] <= "z" ? e.charCodeAt(a) - 87 : e.charCodeAt(a) - 48), 6 <= (r += 4) && (n += t[o >>> (r -= 6)], o &= ~(-1 << r)); 0 < r && (n += t[o <<= 6 - r]); var i = n.length % 4; if (0 < i) for (var u = 0; u < 4 - i; ++u) n += "="; return n }(r.default.HmacSHA256(e, t).toString()) }(o = "accessKeyId=" + t.accessKeyId + "&host=" + o + "&method=" + e.method.toUpperCase() + "&nonce=" + t.nonce + "&path=" + u + n + "×tamp=" + t.timestamp, t.accessKeySecret), "LJAPPVI accessKeyId=" + t.accessKeyId + "; nonce=" + t.nonce + "; timestamp=" + t.timestamp + "; signature=" + e } },
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.