mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Added Bifid Cipher Encode & Decode
Bifid Cipher + Tests
This commit is contained in:
parent
a417a6469c
commit
91c6f682e7
5 changed files with 248 additions and 6 deletions
78
test/tests/operations/Cipher.js
Normal file
78
test/tests/operations/Cipher.js
Normal file
|
@ -0,0 +1,78 @@
|
|||
/**
|
||||
* Cipher tests.
|
||||
*
|
||||
* @author Matt C [matt@artemisbot.uk]
|
||||
*
|
||||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Bifid Cipher Encode: no input",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": ["nothing"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Encode: no key",
|
||||
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
expectedOutput: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": [""]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Encode: normal",
|
||||
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
expectedOutput: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": ["Schrodinger"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: no input",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": ["nothing"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: no key",
|
||||
input: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
|
||||
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": [""]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: normal",
|
||||
input: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
|
||||
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": ["Schrodinger"]
|
||||
}
|
||||
],
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue