Decoupling NIP01 methods from CryptoUtils

Decoupling Encryption and Decryptions from CryptoUtils
Decoupling live instances of JNI bindings for Secp and LibSodium from CryptoUtils
Decoupling key cache from CryptoUtils
Reorganizes NIP-04 to match new package structure
Adjusts test structures to match
This commit is contained in:
Vitor Pamplona
2025-02-17 19:13:05 -05:00
parent 7ad8b2ce46
commit 6d9964a1cb
89 changed files with 1048 additions and 1015 deletions
@@ -85,8 +85,8 @@ import com.vitorpamplona.amethyst.commons.robohash.parts.mouth6Cell
import com.vitorpamplona.amethyst.commons.robohash.parts.mouth7Happy
import com.vitorpamplona.amethyst.commons.robohash.parts.mouth8Buttons
import com.vitorpamplona.amethyst.commons.robohash.parts.mouth9Closed
import com.vitorpamplona.quartz.CryptoUtils
import com.vitorpamplona.quartz.utils.Hex
import com.vitorpamplona.quartz.utils.sha256
val Black = SolidColor(Color.Black)
val Gray = SolidColor(Color(0xFF6d6e70))
@@ -168,7 +168,7 @@ class RobohashAssembler {
Hex.decode(msg)
} else {
Log.w("Robohash", "$msg is not a hex")
CryptoUtils.sha256(msg.toByteArray())
sha256(msg.toByteArray())
}
val bgColor = SolidColor(bytesToColor(hash[0], hash[1], hash[2], isLightTheme))