mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
14 lines
349 B
Dart
14 lines
349 B
Dart
|
import 'dart:typed_data';
|
||
|
|
||
|
import 'package:flutter/services.dart';
|
||
|
|
||
|
const utils = const MethodChannel('com.cake_wallet/native_utils');
|
||
|
|
||
|
Future<Uint8List> secRandom(int count) async {
|
||
|
try {
|
||
|
return await utils.invokeMethod<Uint8List>('sec_random', {'count': count});
|
||
|
} on PlatformException catch (_) {
|
||
|
return Uint8List.fromList([]);
|
||
|
}
|
||
|
}
|