mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
fix decrypt
This commit is contained in:
+1
-1
@@ -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
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user