This commit is contained in:
2026-02-08 16:04:51 +08:00
parent 4ba3745666
commit 8a1aee9d00
4 changed files with 53 additions and 52 deletions

View File

@@ -5,7 +5,6 @@ import {
resolveFilename,
} from "https://global.hatter.ink/script/get/@10/deno-commons-mod.ts";
import {getRandomValues} from "node:crypto";
import {assertEquals} from "jsr:@std/assert";
const COMMONS_LOCAL_ENCRYPT_TINY_ENCRYPT_MASTER_KEY_FILE = resolveFilename(
"~/.cache/commons-local-encrypt-tiny-encrypt-master-key",
@@ -105,12 +104,3 @@ function randomNonce(): ArrayBufferLike {
getRandomValues(buffer);
return buffer;
}
Deno.test("teEncryptDecrypt", async () => {
assertEquals(
"hello world",
await teDecryptToString(
await teEncrypt("hello world"),
),
);
});