Use pointycastle as crypto library. cipher is deprecated.
This commit is contained in:
@@ -9,11 +9,10 @@ import 'dart:typed_data';
|
||||
|
||||
import 'package:asn1lib/asn1lib.dart';
|
||||
import 'package:bignum/bignum.dart';
|
||||
import 'package:cipher/cipher.dart';
|
||||
import 'package:cipher/impl/client.dart';
|
||||
import 'package:pointycastle/pointycastle.dart';
|
||||
import 'package:crypto/crypto.dart';
|
||||
|
||||
export 'package:cipher/cipher.dart' show AsymmetricKeyPair;
|
||||
export 'package:pointycastle/pointycastle.dart' show AsymmetricKeyPair;
|
||||
|
||||
// The ECDSA algorithm parameters we're using. These match the parameters used
|
||||
// by the Flutter updater package.
|
||||
@@ -29,7 +28,7 @@ class CipherParameters {
|
||||
|
||||
// Seeds our secure random number generator using data from /dev/urandom.
|
||||
// Disclaimer: I don't really understand why we need 2 parameters for
|
||||
// cipher's API.
|
||||
// pointycastle's API.
|
||||
Future seedRandom() async {
|
||||
try {
|
||||
RandomAccessFile file = await new File("/dev/urandom").open();
|
||||
@@ -53,7 +52,6 @@ class CipherParameters {
|
||||
|
||||
static CipherParameters get() => _params;
|
||||
static CipherParameters _init() {
|
||||
initCipher();
|
||||
return new CipherParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ author: Flutter Authors <flutter-dev@googlegroups.com>
|
||||
description: Library for dealing with Flutter bundle (.flx) files
|
||||
homepage: https://github.com/flutter/flutter/tree/master/packages/flx
|
||||
dependencies:
|
||||
bignum: ^0.0.7
|
||||
bignum: ^0.1.0
|
||||
asn1lib: ^0.4.1
|
||||
cipher: ^0.7.1
|
||||
pointycastle: 0.10.0
|
||||
crypto: ^0.9.1
|
||||
|
||||
environment:
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:convert' hide BASE64;
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:bignum/bignum.dart';
|
||||
import 'package:cipher/cipher.dart' hide CipherParameters;
|
||||
import 'package:pointycastle/pointycastle.dart' hide CipherParameters;
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:flx/signing.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
Reference in New Issue
Block a user