MCPcopy Create free account
hub / github.com/DOSNetwork/core / InitBytes

Method InitBytes

group/mod/int.go:94–99  ·  view source on GitHub ↗

InitBytes init the Int to a number represented in a big-endian byte string.

(a []byte, m *big.Int, byteOrder ByteOrder)

Source from the content-addressed store, hash-verified

92
93// InitBytes init the Int to a number represented in a big-endian byte string.
94func (i *Int) InitBytes(a []byte, m *big.Int, byteOrder ByteOrder) *Int {
95 i.M = m
96 i.BO = byteOrder
97 i.SetBytes(a)
98 return i
99}
100
101// InitString inits the Int to a rational fraction n/d
102// specified with a pair of strings in a given base.

Callers 3

TestIntEndianBytesFunction · 0.80
TestIntCloneFunction · 0.80
NewIntBytesFunction · 0.80

Calls 1

SetBytesMethod · 0.95

Tested by 2

TestIntEndianBytesFunction · 0.64
TestIntCloneFunction · 0.64