Skip to content

Commit b2faf86

Browse files
authored
Merge pull request #205 from dint-dev/fix/ecdh
fix: platform constraint for ECDH
2 parents 970562e + 0523d4e commit b2faf86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cryptography_flutter/lib/src/flutter/flutter_ecdh.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import 'package:cryptography/cryptography.dart';
1616
import 'package:flutter/foundation.dart';
1717
import 'package:flutter/services.dart';
1818

19-
import '../../cryptography_flutter.dart';
2019
import '../_flutter_cryptography_implementation.dart';
2120
import '../_internal.dart';
2221

@@ -58,9 +57,8 @@ class FlutterEcdh extends Ecdh implements PlatformCryptographicAlgorithm {
5857
super.constructor();
5958

6059
@override
61-
bool get isSupportedPlatform =>
62-
FlutterCryptography.isPluginPresent && isCupertino;
63-
60+
bool get isSupportedPlatform => isAndroid || isCupertino;
61+
bool get isSupportedPlatform => FlutterCryptography.isPluginPresent && (isAndroid || isCupertino);
6462
String get _curveName {
6563
switch (keyPairType) {
6664
case KeyPairType.p256:

0 commit comments

Comments
 (0)