v2 #12

Merged
hugo merged 21 commits from v2 into master 2023-04-05 15:03:47 +00:00
2 changed files with 10 additions and 3 deletions
Showing only changes of commit 8044ccfa43 - Show all commits

View File

@ -13,3 +13,5 @@ export 'src/core/exceptions/exception.dart';
export 'src/implementations/basic_message_channel_native_crypto.dart';
export 'src/implementations/method_channel_native_crypto.dart';
export 'src/interface/native_crypto_platform.dart';
export 'src/pigeon/messages.pigeon.dart';
export 'src/pigeon/test_api.dart';

View File

@ -6,13 +6,18 @@
import 'package:flutter/foundation.dart';
import 'package:native_crypto_platform_interface/native_crypto_platform_interface.dart';
import 'package:native_crypto_platform_interface/src/pigeon/messages.pigeon.dart';
/// An implementation of [NativeCryptoPlatform] that uses Pigeon generated code.
class BasicMessageChannelNativeCrypto extends NativeCryptoPlatform {
/// Creates a new instance of [BasicMessageChannelNativeCrypto].
///
/// The [api] parameter permits to override the default Pigeon API used to
/// interact with the native platform. This is useful for testing.
BasicMessageChannelNativeCrypto({NativeCryptoAPI? api})
: api = api ?? NativeCryptoAPI();
/// The Pigeon API used to interact with the native platform.
@visibleForTesting
NativeCryptoAPI api = NativeCryptoAPI();
final NativeCryptoAPI api;
@override
Future<Uint8List?> hash(Uint8List data, {required String algorithm}) async {