Skip to content

Commit

Permalink
$mol_crypto_secret: use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Nov 20, 2023
1 parent 72c343e commit 3d3607c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/secret/secret.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ namespace $ {

async 'derivation from public & private keys'() {

const A = await $$.$mol_crypto_auditor_pair()
const B = await $$.$mol_crypto_auditor_pair()
const A = await $mol_crypto_key_private.generate()
const B = await $mol_crypto_key_private.generate()

const AK = await $mol_crypto_secret.derive( await A.private.serial(), await B.public.serial() )
const BK = await $mol_crypto_secret.derive( await B.private.serial(), await A.public.serial() )
const AK = await $mol_crypto_secret.derive( A.toString(), B.public().toString() )
const BK = await $mol_crypto_secret.derive( B.toString(), A.public().toString() )

$mol_assert_like(
new Uint8Array( await AK.serial() ),
Expand Down

0 comments on commit 3d3607c

Please sign in to comment.