added delim parameter to utils.mjs

This commit is contained in:
Katie Makarska 2025-04-23 21:05:41 -04:00
parent 23bfe8740f
commit 0a4fd20518

View file

@ -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":