Przeglądaj źródła

migrated crypto_util.dart to null safety

ashilkn 2 lat temu
rodzic
commit
231a4214ae
1 zmienionych plików z 2 dodań i 4 usunięć
  1. 2 4
      lib/utils/crypto_util.dart

+ 2 - 4
lib/utils/crypto_util.dart

@@ -1,5 +1,3 @@
-// @dart=2.9
-
 import 'dart:io' as io;
 import 'dart:io' as io;
 import 'dart:typed_data';
 import 'dart:typed_data';
 
 
@@ -201,7 +199,7 @@ class CryptoUtil {
 
 
   static Uint8List decryptSync(
   static Uint8List decryptSync(
     Uint8List cipher,
     Uint8List cipher,
-    Uint8List key,
+    Uint8List? key,
     Uint8List nonce,
     Uint8List nonce,
   ) {
   ) {
     assert(key != null, "key can not be null");
     assert(key != null, "key can not be null");
@@ -237,7 +235,7 @@ class CryptoUtil {
   static Future<EncryptionResult> encryptFile(
   static Future<EncryptionResult> encryptFile(
     String sourceFilePath,
     String sourceFilePath,
     String destinationFilePath, {
     String destinationFilePath, {
-    Uint8List key,
+    Uint8List? key,
   }) {
   }) {
     final args = <String, dynamic>{};
     final args = <String, dynamic>{};
     args["sourceFilePath"] = sourceFilePath;
     args["sourceFilePath"] = sourceFilePath;