readUint64 decodes a big-endian, 64-bit value into out and advances over it. It reports whether the read was successful.
(s *cryptobyte.String, out *uint64)
| 40 | // readUint64 decodes a big-endian, 64-bit value into out and advances over it. |
| 41 | // It reports whether the read was successful. |
| 42 | func readUint64(s *cryptobyte.String, out *uint64) bool { |
| 43 | var hi, lo uint32 |
| 44 | if !s.ReadUint32(&hi) || !s.ReadUint32(&lo) { |
| 45 | return false |
| 46 | } |
| 47 | *out = uint64(hi)<<32 | uint64(lo) |
| 48 | return true |
| 49 | } |
| 50 | |
| 51 | // readUint8LengthPrefixed acts like s.ReadUint8LengthPrefixed, but targets a |
| 52 | // []byte instead of a cryptobyte.String. |