From 069926aba88f03c9f041983739b4659f51980e8c Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sun, 24 Sep 2023 15:59:47 -0400 Subject: [PATCH] fixes --- veilid-core/src/tests/android/.gitignore | 14 ++++++++++++++ veilid-core/src/tests/android/build.gradle | 1 + .../gradle/wrapper/gradle-wrapper.properties | 5 +++++ veilid-flutter/lib/veilid_crypto.dart | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 veilid-core/src/tests/android/.gitignore create mode 100644 veilid-core/src/tests/android/build.gradle create mode 100644 veilid-core/src/tests/android/gradle/wrapper/gradle-wrapper.properties diff --git a/veilid-core/src/tests/android/.gitignore b/veilid-core/src/tests/android/.gitignore new file mode 100644 index 00000000..f22e976f --- /dev/null +++ b/veilid-core/src/tests/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/.idea +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/veilid-core/src/tests/android/build.gradle b/veilid-core/src/tests/android/build.gradle new file mode 100644 index 00000000..495c5038 --- /dev/null +++ b/veilid-core/src/tests/android/build.gradle @@ -0,0 +1 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. diff --git a/veilid-core/src/tests/android/gradle/wrapper/gradle-wrapper.properties b/veilid-core/src/tests/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..41dfb879 --- /dev/null +++ b/veilid-core/src/tests/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/veilid-flutter/lib/veilid_crypto.dart b/veilid-flutter/lib/veilid_crypto.dart index 6edb6358..a6b3bead 100644 --- a/veilid-flutter/lib/veilid_crypto.dart +++ b/veilid-flutter/lib/veilid_crypto.dart @@ -215,7 +215,8 @@ abstract class VeilidCryptoSystem { final nonce = await randomNonce(); final saltBytes = nonce.decode(); final sharedSecret = await deriveSharedSecret(ekbytes, saltBytes); - return (await cryptNoAuth(body, nonce, sharedSecret))..addAll(saltBytes); + return Uint8List.fromList( + (await cryptNoAuth(body, nonce, sharedSecret)) + saltBytes); } Future decryptNoAuthWithPassword(