HideDecode a uniform representation of this object from a slice, whose length must be exactly HideLen().
(buf []byte)
| 454 | // HideDecode a uniform representation of this object from a slice, |
| 455 | // whose length must be exactly HideLen(). |
| 456 | func (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. |