Removes dependency of the Robohash from CryptoUtils
This commit is contained in:
@@ -85,9 +85,9 @@ import com.vitorpamplona.amethyst.commons.robohashparts.mouth6Cell
|
||||
import com.vitorpamplona.amethyst.commons.robohashparts.mouth7Happy
|
||||
import com.vitorpamplona.amethyst.commons.robohashparts.mouth8Buttons
|
||||
import com.vitorpamplona.amethyst.commons.robohashparts.mouth9Closed
|
||||
import com.vitorpamplona.quartz.crypto.CryptoUtils
|
||||
import com.vitorpamplona.quartz.encoders.Hex
|
||||
import com.vitorpamplona.quartz.encoders.HexValidator
|
||||
import java.security.MessageDigest
|
||||
|
||||
val Black = SolidColor(Color.Black)
|
||||
val Gray = SolidColor(Color(0xFF6d6e70))
|
||||
@@ -172,7 +172,7 @@ class RobohashAssembler {
|
||||
Hex.decode(msg)
|
||||
} else {
|
||||
Log.w("Robohash", "$msg is not a hex")
|
||||
CryptoUtils.sha256(msg.toByteArray())
|
||||
MessageDigest.getInstance("SHA-256").digest(msg.toByteArray())
|
||||
}
|
||||
|
||||
val bgColor = SolidColor(bytesToColor(hash[0], hash[1], hash[2], isLightTheme))
|
||||
|
||||
Reference in New Issue
Block a user