[JS IR] Fix race condition of IC hash calculator
^KT-52154 Fixed
This commit is contained in:
committed by
Space
parent
0be0627e34
commit
7920b8302c
+1
-7
@@ -30,13 +30,7 @@ value class ICHash(private val value: ULong = 0UL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class HashCalculatorForIC {
|
private class HashCalculatorForIC {
|
||||||
private companion object {
|
private val md5 = MessageDigest.getInstance("MD5")
|
||||||
private val md5 = MessageDigest.getInstance("MD5")
|
|
||||||
}
|
|
||||||
|
|
||||||
init {
|
|
||||||
md5.reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun update(data: ByteArray) = md5.update(data)
|
fun update(data: ByteArray) = md5.update(data)
|
||||||
fun update(data: String) = md5.update(data.toByteArray())
|
fun update(data: String) = md5.update(data.toByteArray())
|
||||||
|
|||||||
Reference in New Issue
Block a user