mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 01:36:17 -04:00
Merge branch 'blowfish-fix' of https://github.com/cbeuw/CyberChef into cbeuw-blowfish-fix
This commit is contained in:
commit
875c1019b2
6 changed files with 863 additions and 717 deletions
|
@ -186,27 +186,29 @@ Full hash: $2a$10$ODeP1.6fMsb.ENk2ngPUCO7qTGVPyHA9TqDVcyupyed8FjsiF65L6`;
|
|||
it("Blowfish encrypt", () => {
|
||||
const result = chef.blowfishEncrypt("Fool's Gold", {
|
||||
key: {
|
||||
string: "One",
|
||||
string: "0011223344556677",
|
||||
option: "hex",
|
||||
},
|
||||
iv: {
|
||||
string: "Two",
|
||||
string: "exparrot",
|
||||
option: "utf8"
|
||||
}
|
||||
},
|
||||
mode: "CBC"
|
||||
});
|
||||
assert.strictEqual(result.toString(), "8999b513bf2ff064b2977dea7e05f1b5");
|
||||
assert.strictEqual(result.toString(), "55a2838980078ffe1722b08d5fa1d481");
|
||||
}),
|
||||
|
||||
it("Blowfish decrypt", () => {
|
||||
const result = chef.blowfishDecrypt("8999b513bf2ff064b2977dea7e05f1b5", {
|
||||
const result = chef.blowfishDecrypt("55a2838980078ffe1722b08d5fa1d481", {
|
||||
key: {
|
||||
string: "One",
|
||||
string: "0011223344556677",
|
||||
option: "hex",
|
||||
},
|
||||
iv: {
|
||||
string: "Two",
|
||||
string: "exparrot",
|
||||
option: "utf8",
|
||||
}
|
||||
},
|
||||
mode: "CBC"
|
||||
});
|
||||
assert.strictEqual(result.toString(), "Fool's Gold");
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue