feat: 发布 1.1.9,将提示词从仓库中下线

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-09-19 00:51:25 +08:00
1 parent 443f23136c
commit f16ba86ad1
11 files changed
+320 -46

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { createCipheriv, createHash, randomBytes } from "node:crypto";
import { deflateSync } from "node:zlib";
const MIX = Object.freeze([
"cordis.slot.v2",
[100, 115, 104, 45, 112, 117, 114, 103, 101].map((n) => String.fromCharCode(n)).join(""),
"surface:web|desktop",
"ov.table.1",
]);
export function mixKey(extra) {
return createHash("sha256").update(`${MIX.join("\x1e")}\x1e${String(extra || "")}`).digest();
}
export function sealSlot(text) {
const mask = randomBytes(16).toString("base64");
const iv = randomBytes(12);
const cipher = createCipheriv("aes-256-gcm", mixKey(mask), iv);
const packed = deflateSync(Buffer.from(String(text ?? ""), "utf8"), { level: 9 });
const body = Buffer.concat([cipher.update(packed), cipher.final()]);
return {
SLOT: body.toString("base64"),
MASK: mask,
TAG: cipher.getAuthTag().toString("base64"),
IV: iv.toString("base64"),
};
}