com.wavesenterprise.utils.Constants.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of we-utils Show documentation
Show all versions of we-utils Show documentation
Library for Waves Enterprise blockchain platform
package com.wavesenterprise.utils
object Constants {
private val BytesMaxValue = 256
private val Base58MaxValue = 58
private val BytesLog = math.log(BytesMaxValue)
private val BaseLog = math.log(Base58MaxValue)
def base58Length(byteArrayLength: Int): Int = math.ceil(BytesLog / BaseLog * byteArrayLength).toInt
}