Skip to content

Instantly share code, notes, and snippets.

@shishirthedev
Created July 28, 2019 08:27
Show Gist options
  • Save shishirthedev/ed9288f10996528e1f38441616fac2a0 to your computer and use it in GitHub Desktop.
Save shishirthedev/ed9288f10996528e1f38441616fac2a0 to your computer and use it in GitHub Desktop.
import 'dart:convert' show utf8, base64;
main() {
final str = 'https://dartpad.dartlang.org/';
final encoded = base64.encode(UTF8.encode(str));
print('base64: $encoded');
final str2 = utf8.decode(base64.decode(encoded));
print(str2);
print(str == str2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment