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

Method HideDecode

group/mod/int.go:456–462  ·  view source on GitHub ↗

HideDecode a uniform representation of this object from a slice, whose length must be exactly HideLen().

(buf []byte)

Source from the content-addressed store, hash-verified

454// HideDecode a uniform representation of this object from a slice,
455// whose length must be exactly HideLen().
456func (i *Int) HideDecode(buf []byte) {
457 if len(buf) != i.HideLen() {
458 panic("Int.HideDecode: wrong size buffer")
459 }
460 i.V.SetBytes(buf)
461 i.V.Mod(&i.V, i.M)
462}
463
464// reverse copies src into dst in byte-reversed order and returns dst,
465// such that src[0] goes into dst[len-1] and vice versa.

Callers

nothing calls this directly

Calls 2

HideLenMethod · 0.95
SetBytesMethod · 0.45

Tested by

no test coverage detected