This commit is contained in:
2024-09-12 00:14:30 +02:00
parent 5f40b948ff
commit 524e9026b8
2 changed files with 15 additions and 5 deletions
+7 -1
View File
@@ -1,7 +1,13 @@
import {describe, expect, test} from 'bun:test'
import {kdf, PrivateWrap, SecretBox, SecretWrap} from '..'
async function test_keys(k1: CryptoKey, k2: CryptoKey, usage: kdf.Usage | kdf.DHusage, should_box: boolean, should_unbox: boolean) {
async function test_keys(
k1: CryptoKey,
k2: CryptoKey,
usage: kdf.Usage | kdf.DHusage,
should_box: boolean,
should_unbox: boolean
) {
if (usage === kdf.Usage.wrap || usage == kdf.DHusage.wrap) {
const payload = await SecretBox.gen(true)