Versions in this module Expand all Collapse all v0 v0.8.0 Nov 10, 2019 Changes in this version + var BigOne = big.NewInt(1) + var MOD128 = new(big.Int).Sub(P128, BigOne) + var MOD256 = new(big.Int).Sub(P256, BigOne) + var P128 = new(big.Int).SetBit(new(big.Int), 128, 1) + var P256 = new(big.Int).SetBit(new(big.Int), 256, 1) + type Uint128 struct + func NewUint128FromBigInt(data *big.Int) *Uint128 + func NewUint128FromBytes(data []byte) *Uint128 + func NewUint128FromHexString(data string) *Uint128 + func NewUint128FromString(data string, base int) *Uint128 + func NewUint128FromUint128(data *Uint128) *Uint128 + func (ui128 *Uint128) Add(y *Uint128) bool + func (ui128 *Uint128) BitLen() int + func (ui128 *Uint128) Bytes() []byte + func (ui128 *Uint128) Div(y *Uint128) bool + func (ui128 *Uint128) MarshalJSON() ([]byte, error) + func (ui128 *Uint128) Mul(y *Uint128) bool + func (ui128 *Uint128) String() string + func (ui128 *Uint128) Sub(y *Uint128) bool + func (ui128 *Uint128) UnmarshalJSON(byteJson []byte) (err error) + type Uint256 struct + func AddUint256(x *Uint256, y *Uint256) (ret *Uint256, check bool) + func DivUint256(x *Uint256, y *Uint256) (ret *Uint256, check bool) + func MulUint256(x *Uint256, y *Uint256) (ret *Uint256, check bool) + func NewUint256FromBigInt(data *big.Int) *Uint256 + func NewUint256FromBytes(data []byte) *Uint256 + func NewUint256FromHexString(data string) *Uint256 + func NewUint256FromString(data string, base int) *Uint256 + func NewUint256FromUint256(data *Uint256) *Uint256 + func SubUint256(x *Uint256, y *Uint256) (ret *Uint256, check bool) + func (ui256 *Uint256) Add(y *Uint256) bool + func (ui256 *Uint256) BitLen() int + func (ui256 *Uint256) Bytes() []byte + func (ui256 *Uint256) Comp(y *Uint256) int + func (ui256 *Uint256) Div(y *Uint256) bool + func (ui256 *Uint256) MarshalJSON() ([]byte, error) + func (ui256 *Uint256) Mul(y *Uint256) bool + func (ui256 *Uint256) String() string + func (ui256 *Uint256) Sub(y *Uint256) bool + func (ui256 *Uint256) UnmarshalJSON(byteJson []byte) (err error)