rename encrypt/decrypt to wrap/unwrap in *Wrap
ci/woodpecker/manual/test Pipeline was successful

This commit is contained in:
2024-09-09 22:49:42 +02:00
parent c49f3b84bf
commit 9de49c228d
8 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ test('Private wrap', async () => {
const message = crypto.getRandomValues(new Uint8Array(8))
const k_wrapped = await SecretBox.gen(true)
const boxed_message = await SecretBox.encrypt(message, k_wrapped)
const box = await PrivateWrap.encrypt(k_wrapped, de!)
const unbox = await box.decrypt(k.privateKey)
const box = await PrivateWrap.wrap(k_wrapped, de!)
const unbox = await box.unwrap(k.privateKey)
expect(unbox).not.toBeNull()
const unboxed_message = await boxed_message.decrypt(unbox!)