mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
Removes dependency of the Robohash from CryptoUtils
This commit is contained in:
parent
6cd04a7617
commit
dd81c51fab
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user