kotlin-multiplatform-bignum v0.1.6-SNAPSHOT Release Notes

    • ๐Ÿ›  Fixed #86 - Rounding fails when integer part is 9
    • ๐Ÿ›  Fixed #88 - BigInteger.bitAt() returns invalid value
    • Built with Kotlin 1.4-M3
    • Reworked to(U)ByteArray conversion methods
      • from and to conversions were not consistent, from(U)ByteArray expected a string of bytes ordered in little or big endian, while to(U)ByteArray produced Int or Long represented as byte with little endian or big endian order.
      • Replaced with a consistent to and from byte/ubyte array conversions
        • fromUByteArray always expects a big-endian ordered array of unsigned bytes
        • fromByteArray always expects a big-endian ordered array of bytes
        • toUByteArray produces unsigned byte array in big-endian order
        • toByteArray produces signed byte array in big-endian order
      • There are two helper methods that convert to and from a two's complement ByteArray, this form conforms to Java BigIntegers toByteArray
        • fromTwosComplementByteArray expects a two's complement ByteArray with at least one sign bit
        • toTwosComplementByteArrayproduces a two's complement ByteArray with at least one sign bit
    • โž• Added secureOverwrite to BigNumber interface, with role of overwriting backing structures with zeroes. It's meant to be used by libraries that require such a functionlity (i.e. crypto). The function also breaks immutability contract of BigNumber implementations, and further operations with that instances have undefined results.