moves keystore to commons to avoid unnecessary dependencies on Quartz

This commit is contained in:
Vitor Pamplona
2026-01-07 11:09:45 -05:00
parent 7a7ce69709
commit ce01e8f70c
7 changed files with 13 additions and 13 deletions
+7
View File
@@ -104,6 +104,9 @@ kotlin {
// Desktop-specific Compose
implementation(compose.desktop.currentOs)
implementation(compose.uiTooling)
// Secure key storage via OS keychain (macOS/Windows/Linux)
implementation(libs.java.keyring)
}
}
@@ -112,6 +115,10 @@ kotlin {
dependencies {
// Android-specific Compose tooling
implementation(libs.androidx.ui.tooling.preview)
// Secure key storage via Android Keystore
implementation(libs.androidx.security.crypto.ktx)
implementation(libs.androidx.datastore.preferences)
}
}
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.quartz.nip01Core.crypto
package com.vitorpamplona.amethyst.commons.keystorage
import android.os.Build
import android.security.keystore.KeyGenParameterSpec
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.quartz.nip01Core.crypto
package com.vitorpamplona.amethyst.commons.keystorage
import android.content.Context
import androidx.security.crypto.EncryptedSharedPreferences
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.quartz.nip01Core.crypto
package com.vitorpamplona.amethyst.commons.keystorage
/**
* Secure storage for private keys using platform-specific secure storage mechanisms.
@@ -21,11 +21,11 @@
package com.vitorpamplona.amethyst.commons.account
import androidx.compose.runtime.Stable
import com.vitorpamplona.amethyst.commons.keystorage.SecureKeyStorage
import com.vitorpamplona.amethyst.commons.keystorage.SecureStorageException
import com.vitorpamplona.quartz.nip01Core.core.hexToByteArray
import com.vitorpamplona.quartz.nip01Core.core.toHexKey
import com.vitorpamplona.quartz.nip01Core.crypto.KeyPair
import com.vitorpamplona.quartz.nip01Core.crypto.SecureKeyStorage
import com.vitorpamplona.quartz.nip01Core.crypto.SecureStorageException
import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner
import com.vitorpamplona.quartz.nip01Core.signers.NostrSignerInternal
import com.vitorpamplona.quartz.nip19Bech32.decodePrivateKeyAsHexOrNull
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.quartz.nip01Core.crypto
package com.vitorpamplona.amethyst.commons.keystorage
import com.github.javakeyring.BackendNotSupportedException
import com.github.javakeyring.Keyring
-7
View File
@@ -166,9 +166,6 @@ kotlin {
// LibSodium for ChaCha encryption (NIP-44)
implementation (libs.lazysodium.java)
implementation (libs.jna)
// Secure key storage via OS keychain (macOS/Windows/Linux)
implementation(libs.java.keyring)
}
}
@@ -191,10 +188,6 @@ kotlin {
// LibSodium for ChaCha encryption (NIP-44)
implementation ("com.goterl:lazysodium-android:5.2.0@aar")
implementation ("net.java.dev.jna:jna:5.18.1@aar")
// Secure key storage via Android Keystore
implementation(libs.androidx.security.crypto.ktx)
implementation(libs.androidx.datastore.preferences)
}
}