refactor utility function name
This commit is contained in:
@@ -62,7 +62,7 @@ internal class BigInt private constructor(
|
||||
get() = BigInt(intArrayOf(0))
|
||||
|
||||
fun from(bytes: ByteArray): BigInt {
|
||||
val words = IntArray(bytes.size.divCeil(4))
|
||||
val words = IntArray(bytes.size.ceilDiv(4))
|
||||
for (i in bytes.indices) {
|
||||
val (wi, bi) = (bytes.lastIndex - i).divRem(4)
|
||||
words[wi] = words[wi] or ((bytes[i].toInt() and 0xFF) shl (bi * 8))
|
||||
|
||||
Reference in New Issue
Block a user