embedded: expose anastasis reducer for testing
This commit is contained in:
parent
d33b70b069
commit
e6c0689806
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user