Created
July 28, 2019 08:27
-
-
Save shishirthedev/ed9288f10996528e1f38441616fac2a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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