Documentation ¶
Index ¶
- Constants
- func BitLen(a Int) uint
- func Cmp(a, b Int) int
- type Int
- func Add(a, b Int) Int
- func Div(a, b Int) Int
- func Exp(a Int, e Int) Int
- func FromBytes(buf []byte) (Int, error)
- func FromString(s string) (Int, error)
- func Lsh(a Int, n uint) Int
- func Max(x, y Int) Int
- func Min(x, y Int) Int
- func Mod(a, b Int) Int
- func Mul(a, b Int) Int
- func NewInt(i int64) Int
- func NewIntUnsigned(i uint64) Int
- func PositiveFromUnsignedBytes(b []byte) Int
- func Rsh(a Int, n uint) Int
- func Sub(a, b Int) Int
- func Zero() Int
- func (bi *Int) Bytes() ([]byte, error)
- func (bi Int) Copy() Int
- func (bi Int) Equals(o Int) bool
- func (bi Int) GreaterThan(o Int) bool
- func (bi Int) GreaterThanEqual(o Int) bool
- func (bi *Int) IsZero() bool
- func (bi Int) LessThan(o Int) bool
- func (bi Int) LessThanEqual(o Int) bool
- func (bi *Int) MarshalBinary() ([]byte, error)
- func (bi *Int) MarshalCBOR(w io.Writer) error
- func (bi *Int) MarshalJSON() ([]byte, error)
- func (bi Int) Neg() Int
- func (bi *Int) Nil() bool
- func (bi *Int) UnmarshalBinary(buf []byte) error
- func (bi *Int) UnmarshalCBOR(br io.Reader) error
- func (bi *Int) UnmarshalJSON(b []byte) error
Constants ¶
View Source
const BigIntMaxSerializedLen = 128
BigIntMaxSerializedLen is the max length of a byte slice representing a CBOR serialized big.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Int ¶
func FromString ¶
func NewIntUnsigned ¶
func PositiveFromUnsignedBytes ¶
PositiveFromUnsignedBytes interprets b as the bytes of a big-endian unsigned integer and returns a positive Int with this absolute value.
func (Int) GreaterThanEqual ¶
GreaterThanEqual returns true if bi >= o
func (Int) LessThanEqual ¶
LessThanEqual returns true if bi <= o
func (*Int) MarshalBinary ¶
func (*Int) MarshalJSON ¶
func (*Int) UnmarshalBinary ¶
func (*Int) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.