mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
fromHex can now extract 0x format
This commit is contained in:
parent
597fba2fd0
commit
41c8a5aff0
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ export function toHexFast(data) {
|
||||||
*/
|
*/
|
||||||
export function fromHex(data, delim="Auto", byteLen=2) {
|
export function fromHex(data, delim="Auto", byteLen=2) {
|
||||||
if (delim !== "None") {
|
if (delim !== "None") {
|
||||||
const delimRegex = delim === "Auto" ? /[^a-f\d]/gi : Utils.regexRep(delim);
|
const delimRegex = delim === "Auto" ? /[^a-f\d]|(0x)/gi : Utils.regexRep(delim);
|
||||||
data = data.replace(delimRegex, "");
|
data = data.replace(delimRegex, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue