Fix copypastah errors

This commit is contained in:
Vishnu Mohandas 2020-09-28 21:45:06 +05:30
parent f2b10a4168
commit 4de5c56a3f

View file

@ -107,7 +107,8 @@ class CryptoUtil {
args["source"] = source;
args["nonce"] = nonce;
args["key"] = key;
final encryptedData = await Computer().compute(chachaDecrypt, param: args);
final encryptedData =
await Computer().compute(cryptoSecretboxEasy, param: args);
return EncryptedData(
EncryptionAttribute(bytes: key),
@ -123,7 +124,7 @@ class CryptoUtil {
args["nonce"] = nonce;
args["key"] = key;
if (background) {
return Computer().compute(chachaDecrypt, param: args);
return Computer().compute(cryptoSecretboxOpenEasy, param: args);
} else {
return cryptoSecretboxOpenEasy(args);
}
@ -136,7 +137,7 @@ class CryptoUtil {
final args = Map<String, dynamic>();
args["sourceFilePath"] = sourceFilePath;
args["destinationFilePath"] = destinationFilePath;
return Computer().compute(chachaDecrypt, param: args);
return Computer().compute(chachaEncrypt, param: args);
}
static Future<void> decryptFile(