cipher.process returns an Uint8List which is a list of unsigned integers (0-255). I need to convert this Uint8List to a string that I can easily convert back to the same Uint8List.
var cipherText = cipher.process( inputAsUint8List ); return ASCII.decode(cipherText);
ASCII.decode throws an error since some of the integers are > 127.
I guess this should do it:
String s = new String.fromCharCodes(inputAsUint8List); var outputAsUint8List = new Uint8List.fromList(s.codeUnits);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With