fix decrypt

This commit is contained in:
greenart7c3
2023-10-09 08:57:31 -03:00
parent 6810ee76b3
commit 27348e3e41
3 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ dependencies {
implementation "androidx.core:core-splashscreen:1.0.1"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation 'androidx.activity:activity-compose:1.8.0'
implementation "androidx.compose.ui:ui:$compose_ui_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version"
@@ -71,11 +71,19 @@ object AmberUtils {
decryptZapEvent(data, account)
}
SignerType.NIP04_DECRYPT -> {
CryptoUtils.decryptNIP04(
var decryptedContent = CryptoUtils.decryptNIP04(
data,
account.keyPair.privKey,
Hex.decode(pubKey)
)
if (decryptedContent.contains("?iv=")) {
decryptedContent = CryptoUtils.decryptNIP04(
decryptedContent,
account.keyPair.privKey,
Hex.decode(pubKey)
)
}
decryptedContent
}
SignerType.NIP04_ENCRYPT -> {
CryptoUtils.encryptNIP04(
+3 -3
View File
@@ -3,9 +3,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
ext {
lifecycle_version = '2.6.1'
compose_ui_version = '1.5.1'
compose_ui_test_version = '1.5.2'
nav_version = "2.7.3"
compose_ui_version = '1.5.3'
compose_ui_test_version = '1.5.3'
nav_version = "2.7.4"
}
}