mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 17:26:17 -04:00
Add LongToBytes/BytesToLong operations
This commit is contained in:
parent
1efbd9dfd1
commit
9f9c20a4f5
5 changed files with 138 additions and 1 deletions
|
@ -33,6 +33,7 @@ import "./tests/BLAKE2s.mjs";
|
|||
import "./tests/Bombe.mjs";
|
||||
import "./tests/BSON.mjs";
|
||||
import "./tests/ByteRepr.mjs";
|
||||
import "./tests/BytesLong.mjs";
|
||||
import "./tests/CaesarBoxCipher.mjs";
|
||||
import "./tests/CaretMdecode.mjs";
|
||||
import "./tests/CartesianProduct.mjs";
|
||||
|
|
34
tests/operations/tests/BytesLong.mjs
Normal file
34
tests/operations/tests/BytesLong.mjs
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* BytesToLong/LongToBytes tests
|
||||
*
|
||||
* @author clubby789 [github.com/clubby789]
|
||||
* @copyright Crown Copyright 2024
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import TestRegister from "../../lib/TestRegister.mjs";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Bytes to Long",
|
||||
input: "This is a testing string!",
|
||||
expectedOutput: "529836718428447222471796396193323181240742300695594145834785",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Bytes to Long",
|
||||
args: []
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Long to Bytes",
|
||||
input: "529836718428447222471796396193323181240742300695594145834785",
|
||||
expectedOutput: "This is a testing string!",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Long to Bytes",
|
||||
args: []
|
||||
}
|
||||
],
|
||||
}
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue