Skip to content

Instantly share code, notes, and snippets.

/*
pubspec.yaml:
name: myscripts
version: 1.0.0
dependencies:
xml:
intl:
*/
@ziizii
ziizii / rsa.dart
Last active August 13, 2018 08:33
How to generate RSA private/public key pair in Dart with Pointy Castle
import 'dart:html';
import 'dart:math';
import 'dart:typed_data';
import "package:bignum/bignum.dart";
import "package:pointycastle/export.dart";
void main() {
var keyParams = new RSAKeyGeneratorParameters(new BigInteger("65537"), 2048, 5);