Skip to content

Instantly share code, notes, and snippets.

@sh4869
Created July 10, 2014 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sh4869/48ef53dd668f6c0bb7f2 to your computer and use it in GitHub Desktop.
Save sh4869/48ef53dd668f6c0bb7f2 to your computer and use it in GitHub Desktop.
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