mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
Add Salsa20 tests
This commit is contained in:
parent
4df8606f7b
commit
f5049d6707
3 changed files with 125 additions and 0 deletions
|
@ -828,6 +828,20 @@ pCGTErs=
|
|||
assert.strictEqual(result.toString().length, 4582);
|
||||
}),
|
||||
|
||||
it("Salsa20 Encrypt", () => {
|
||||
const result = chef.salsa20Encrypt("Don't mention the Scottish play", {
|
||||
key: {
|
||||
string: "0011223344556677001122334455667700112233445566770011223344556677",
|
||||
option: "hex",
|
||||
},
|
||||
nonce: {
|
||||
string: "Macbeth!",
|
||||
option: "utf8"
|
||||
},
|
||||
});
|
||||
assert.strictEqual(result.toString(), "baaabfa62278b718790c893046d2cf24c4ae5d3930755faf0dd9506235064e");
|
||||
}),
|
||||
|
||||
it("Scan for embedded files", () => {
|
||||
const result = chef.scanForEmbeddedFiles(fs.readFileSync("src/web/static/images/cook_male-32x32.png"));
|
||||
const expected = "Scanning data for 'magic bytes' which may indicate embedded files.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue