mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 11:07:19 +00:00
perf: move encryption/decryption to a separate thread
This commit is contained in:
parent
0b337a13a4
commit
b7c7e002eb
16 changed files with 310 additions and 147 deletions
|
@ -1,9 +1,9 @@
|
|||
import test from "ava";
|
||||
import { decrypt, encrypt } from "./crypt";
|
||||
|
||||
test("encrypt() followed by decrypt()", (t) => {
|
||||
test("encrypt() followed by decrypt()", async (t) => {
|
||||
const original = "banana 123 👀 💕"; // Includes emojis to verify utf8 stuff works
|
||||
const encrypted = encrypt(original);
|
||||
const decrypted = decrypt(encrypted);
|
||||
const encrypted = await encrypt(original);
|
||||
const decrypted = await decrypt(encrypted);
|
||||
t.is(decrypted, original);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue