mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 10:14:53 -04:00
added delim parameter to utils.mjs
This commit is contained in:
parent
23bfe8740f
commit
0a4fd20518
1 changed files with 2 additions and 2 deletions
|
@ -339,12 +339,12 @@ class Utils {
|
|||
* // returns [208, 159, 209, 128, 208, 184, 208, 178, 208, 181, 209, 130]
|
||||
* Utils.convertToByteArray("0JfQtNGA0LDQstGB0YLQstGD0LnRgtC1", "base64");
|
||||
*/
|
||||
static convertToByteArray(str, type) {
|
||||
static convertToByteArray(str, type, delim = "Auto") {
|
||||
switch (type.toLowerCase()) {
|
||||
case "binary":
|
||||
return fromBinary(str);
|
||||
case "hex":
|
||||
return fromHex(str);
|
||||
return fromHex(str, delim);
|
||||
case "decimal":
|
||||
return fromDecimal(str);
|
||||
case "base64":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue