Merge branch 'master' into fix/from-decimal-auto-delim
This commit is contained in:
commit
f768c465e1
1
.github/ISSUE_TEMPLATE.md
vendored
1
.github/ISSUE_TEMPLATE.md
vendored
@ -1 +0,0 @@
|
||||
<!-- Prefix the title above with 'Misc:' -->
|
||||
12
.github/ISSUE_TEMPLATE/operation-request.md
vendored
12
.github/ISSUE_TEMPLATE/operation-request.md
vendored
@ -7,8 +7,14 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
**Is your operation request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. E.g. I'm always frustrated when [...]
|
||||
|
||||
### Example Input
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of the new operation you would like.
|
||||
|
||||
### Example Output
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Example input and output**
|
||||
Provide an example input to the operation, along with the output that you would expect.
|
||||
|
||||
15
.github/pull_request_template.md
vendored
Normal file
15
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
**Description**
|
||||
Provide a description of the pull request and the changes that it makes.
|
||||
|
||||
**Existing Issue**
|
||||
If this pull request relates to an existing issue in the repository, please link it here.
|
||||
|
||||
**Screenshots**
|
||||
If the pull request changes any visual aspects of CyberChef, please include screenshots.
|
||||
|
||||
**AI disclosure**
|
||||
If you have used any AI tools while creating this code, **you must declare your usage along with the name of the tools that you used**.
|
||||
Regardless of AI tool usage, you are responsible for any code that you submit, and we expect you to have checked the code and have enough of an understanding of it to answer any questions we might have.
|
||||
|
||||
**Test Coverage**
|
||||
Please ensure you have added test coverage for your changes.
|
||||
@ -50,6 +50,7 @@ const HEX_ALPHABET_MAP = HEX_ALPHABET.split("");
|
||||
export function toModhex(data, delim=" ", padding=2, extraDelim="", lineSize=0) {
|
||||
if (!data) return "";
|
||||
if (data instanceof ArrayBuffer) data = new Uint8Array(data);
|
||||
if (data.length === 0) return "";
|
||||
|
||||
const regularHexString = toHex(data, "", padding, "", 0);
|
||||
|
||||
@ -100,6 +101,7 @@ export function toModhex(data, delim=" ", padding=2, extraDelim="", lineSize=0)
|
||||
export function toModhexFast(data) {
|
||||
if (!data) return "";
|
||||
if (data instanceof ArrayBuffer) data = new Uint8Array(data);
|
||||
if (data.length === 0) return "";
|
||||
|
||||
const output = [];
|
||||
|
||||
|
||||
@ -147,4 +147,24 @@ dc;ii;hv;ig;hr;hf;dc;he;hj;hv;hv;ie;hg;du",
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Empty input through From Hex and To Modhex returns empty output",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "From Hex",
|
||||
"args": [
|
||||
"Auto"
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "To Modhex",
|
||||
"args": [
|
||||
"Space",
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user