diff options
author | Florian Dold <florian@dold.me> | 2023-08-09 19:43:11 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-09 19:43:36 +0200 |
commit | e6c0689806e8dd7b5f7885be92ddf00f6e09c41e (patch) | |
tree | 467deac04577c144610f4582a47bb8ebe5be416e | |
parent | d33b70b06940315510ee2c97ced62a8c377fad07 (diff) |
embedded: expose anastasis reducer for testing
-rw-r--r-- | packages/taler-wallet-embedded/src/wallet-qjs.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts b/packages/taler-wallet-embedded/src/wallet-qjs.ts index 278a90c83..7958fe90d 100644 --- a/packages/taler-wallet-embedded/src/wallet-qjs.ts +++ b/packages/taler-wallet-embedded/src/wallet-qjs.ts @@ -49,9 +49,7 @@ import { mergeDiscoveryAggregate, ReducerState, } from "@gnu-taler/anastasis-core"; -import { - userIdentifierDerive, -} from "@gnu-taler/anastasis-core/lib/crypto.js"; +import { userIdentifierDerive } from "@gnu-taler/anastasis-core/lib/crypto.js"; setGlobalLogLevelFromString("trace"); @@ -335,13 +333,15 @@ export async function testArgon2id() { }, input_server_salt: "FZ48EFS7WS3R2ZR4V53A3GFFY4", output_id: - "YS45R6CGJV84K1NN7T14ZBCPVTZ6H15XJSM1FV0R748MHPV82SM0126EBZKBAAGCR34Q9AFKPEW1HRT2Q9GQ5JRA3642AB571DKZS18", + "YS45R6CGJV84K1NN7T14ZBCPVTZ6H15XJSM1FV0R748MHPV82SM0126EBZKBAAGCR34Q9AFKPEW1HRT2Q9GQ5JRA3642AB571DKZS18", }; - if (await userIdentifierDerive( - userIdVector.input_id_data, - userIdVector.input_server_salt, - ) != userIdVector.output_id) { + if ( + (await userIdentifierDerive( + userIdVector.input_id_data, + userIdVector.input_server_salt, + )) != userIdVector.output_id + ) { throw Error("argon2id is not working!"); } @@ -354,4 +354,5 @@ globalThis.testWithGv = testWithGv; globalThis.testWithLocal = testWithLocal; // @ts-ignore globalThis.testArgon2id = testArgon2id; - +// @ts-ignore +globalThis.testReduceAction = reduceAction; |