Documentation ¶
Index ¶
- Variables
- func BaseXAlphabetToInt64(s string, alphabet string) (int64, error)
- func BaseXToInt64(s string, base int) (int64, error)
- func Copy(x *big.Int) *big.Int
- func DecodeString(base int, s string) ([]byte, error)
- func Div(a, b *big.Int) *big.Int
- func EncodeToString(base int, s []byte) (string, error)
- func Equal(x, y *big.Int) bool
- func Int64ToBaseX(x int64, base int) string
- func Int64ToBaseXAlphabet(x int64, alphabet string) (string, error)
- func IntToHex(x *big.Int) string
- func Mod(a, n *big.Int) *big.Int
- func ModInt64(a, n int64) int64
- func MustEncodeToString(base int, s []byte) string
- func NewIntHex(hexNumStr string) (*big.Int, error)
- func NewIntString(val string) (*big.Int, error)
- func NewIntUint64(val uint64) *big.Int
- func Pow(x, y *big.Int) *big.Int
- func PowInt64(x, y int64) int64
- func SplitInt64(x int64, scale uint) (int64, int64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBaseInvalid = errors.New("invalid base - must be between [2,62]")
View Source
var ErrSetStringFailure = errors.New("string conversion to `*big.Int` failed")
Functions ¶
func BaseXAlphabetToInt64 ¶ added in v0.47.0
func EncodeToString ¶ added in v0.42.0
EncodeToString uses [0-9a-zA-Z] for base62.
func Int64ToBaseX ¶ added in v0.47.0
func Int64ToBaseXAlphabet ¶ added in v0.47.0
func MustEncodeToString ¶ added in v0.42.0
MustEncodeToString uses [0-9a-zA-Z] for base62.
func NewIntString ¶
NewIntString creates a new `*big.Int` from an uint64.
func NewIntUint64 ¶
NewIntUint64 creates a new `*big.Int` from an uint64.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.