New test case extracted from status-go

This commit is contained in:
Franck Royer 2021-10-22 12:33:18 +11:00
parent 61284731ee
commit 10c7641598
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 10 additions and 0 deletions

View File

@ -11,4 +11,14 @@ describe("Encryption", () => {
"c49ad65ebf2a7b7253bf400e3d27719362a91b2c9b9f54d50a69117021666c33"
);
});
it("Generate symmetric key from password for chat", async function () {
const str =
"0x02dcec6041fb999d65f1d33363e08c93d3c1f6f0fbbb26add383e2cf46c2b921f41dc14fd8-9a8b-4df5-a358-2c3067be5439";
const symKey = await createSymKeyFromPassword(str);
expect(Buffer.from(symKey).toString("hex")).to.eq(
"76ff5bf0a74a8e724367c7fc003f066d477641f468768a8da2817addf5c2ce76"
);
});
});