mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 17:26:17 -04:00
allow whitespace in elements of data
I think this was why it was failing a test
This commit is contained in:
parent
d5d2660655
commit
542bbdc248
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ export function fromHex(data, delim="Auto", byteLen=2) {
|
|||
|
||||
const output = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (/[^a-f\d]/.test(data[i]))
|
||||
if (/[^a-f\d\s]/.test(data[i]))
|
||||
throw new OperationError("Hex input must only contain hex digits");
|
||||
for (let j = 0; j < data[i].length; j += byteLen) {
|
||||
output.push(parseInt(data[i].substr(j, byteLen), 16));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue