2
0
mirror of https://github.com/gchq/CyberChef synced 2026-01-04 09:33:21 +00:00

Add Argon2 hash compare operation

This commit is contained in:
Tan Zhen Yong
2019-10-07 17:44:00 +08:00
parent 2fab1028c5
commit bca4c34b3a
3 changed files with 66 additions and 0 deletions

View File

@@ -138,6 +138,13 @@ Tiger-128`;
assert.strictEqual(result.toString(), "$argon2i$v=19$m=4096,t=3,p=1$c29tZXNhbHQ$s43my9eBljQADuF/LWCG8vGqwAJzOorKQ0Yog8jFvbw");
}),
it("argon2 compare", async () => {
const result = await chef.argon2Compare("argon2password", {
hash: "$argon2i$v=19$m=4096,t=3,p=1$c29tZXNhbHQ$s43my9eBljQADuF/LWCG8vGqwAJzOorKQ0Yog8jFvbw"
});
assert.strictEqual(result.toString(), "Match: argon2password");
}),
it("Bcrypt", async () => {
const result = await chef.bcrypt("Put a Sock In It");
const strResult = result.toString();