str2ByteArray function
This is a utility function that is used by the keystore to decode strings that are used in the encrypted json
Implementation
Uint8List str2ByteArray(String str, {String enc = ''}) {
if (enc == 'latin1') {
return latin1.encode(str);
} else {
return Uint8List.fromList(Base58Encoder.instance.decode(str));
}
}