mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Fixed non-thread safe usage
This commit is contained in:
parent
d410e5ec17
commit
b391d730fa
|
@ -20,10 +20,9 @@ package mdnet.server
|
||||||
|
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
|
|
||||||
private val DIGEST = MessageDigest.getInstance("MD5")
|
fun md5Bytes(stringToHash: String) =
|
||||||
fun md5Bytes(stringToHash: String): ByteArray {
|
MessageDigest.getInstance("MD5")
|
||||||
return DIGEST.digest(stringToHash.toByteArray())
|
.digest(stringToHash.toByteArray())
|
||||||
}
|
|
||||||
|
|
||||||
fun printHexString(bytes: ByteArray): String {
|
fun printHexString(bytes: ByteArray): String {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
|
|
Loading…
Reference in a new issue