aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_recovery_key.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_recovery_key.py')
-rw-r--r--packages/meshbay-hub/tests/test_recovery_key.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/meshbay-hub/tests/test_recovery_key.py b/packages/meshbay-hub/tests/test_recovery_key.py
index e43e6de..c574597 100644
--- a/packages/meshbay-hub/tests/test_recovery_key.py
+++ b/packages/meshbay-hub/tests/test_recovery_key.py
@@ -84,10 +84,11 @@ const fp = async (key) => hex(await webcrypto.subtle.encrypt(
const kB = await K.deriveRecoveryKey(raw, 'acc-B');
const skEd = new Uint8Array([1, 2, 3]);
const skX = new Uint8Array([4, 5, 6]);
- const blob = await K.encryptBundleWithKey(skEd, skX, kA);
+ const sealedFor = { userId: 'acc-A', nodePk: 'node-key' };
+ const blob = await K.encryptBundle(skEd, skX, kA, { ...sealedFor, pepperVersion: 0 });
let wrongRejected = false;
- try { await K.decryptBundleWithKey(blob, kB); } catch { wrongRejected = true; }
- const opened = await K.decryptBundleWithKey(blob, kA);
+ try { await K.decryptBundle(blob, kB, sealedFor); } catch { wrongRejected = true; }
+ const opened = await K.decryptBundle(blob, kA, sealedFor);
out.recovery_wrap_isolates = wrongRejected
&& opened.skEd === btoa(String.fromCharCode(1, 2, 3))
&& opened.skX === btoa(String.fromCharCode(4, 5, 6));