decodeStr function
Implementation
Uint8List decodeStr(String data, Encoding encoding) {
switch (encoding) {
case Encoding.base58:
return fromB58(data);
case Encoding.base64:
return fromB64(data);
case Encoding.hex:
return fromHEX(data);
default:
throw ArgumentError(
"Unsupported encoding, supported values are: base64, hex"
);
}
}