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
|
||||
|
||||
private val DIGEST = MessageDigest.getInstance("MD5")
|
||||
fun md5Bytes(stringToHash: String): ByteArray {
|
||||
return DIGEST.digest(stringToHash.toByteArray())
|
||||
}
|
||||
fun md5Bytes(stringToHash: String) =
|
||||
MessageDigest.getInstance("MD5")
|
||||
.digest(stringToHash.toByteArray())
|
||||
|
||||
fun printHexString(bytes: ByteArray): String {
|
||||
val sb = StringBuilder()
|
||||
|
|
Loading…
Reference in a new issue