Created
July 10, 2014 04:16
-
-
Save sh4869/48ef53dd668f6c0bb7f2 to your computer and use it in GitHub Desktop.
This file contains 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:math'; | |
import 'dart:convert'; | |
import 'package:crypto/crypto.dart'; | |
void main(){ | |
var rnd = new Random(); | |
var one = rnd.nextInt(pow(2,8*4)); | |
var two = rnd.nextInt(pow(2,8*4)); | |
var thr = rnd.nextInt(pow(2,8*3)); | |
List<int> onel = UTF8.encode(one.toString()); | |
List<int> twol = UTF8.encode(two.toString()); | |
List<int> thrl = UTF8.encode(thr.toString()); | |
var ones = CryptoUtils.bytesToBase64(onel); | |
var twos = CryptoUtils.bytesToBase64(twol); | |
var thrs = CryptoUtils.bytesToBase64(thrl); | |
var str = ones + twos + thrs; | |
print("${str}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment