cryptobyte.String has ReadUint8, ReadUint16, ReadUint24, and ReadUint32 but no ReadUint64.
Likewise, cryptobyte.Builder has AddUint8, AddUint16, AddUint24, and AddUint32 but no AddUint64.
I ran into the omission when writing a parser for a Certificate Transparency Merkle Tree Leaf which uses 64 bit integers for timestamps.
I propose adding:
// ReadUint64 decodes a big-endian, 64-bit value into out and advances over it.
// It reports whether the read was successful.
func (s *String) ReadUint64(out *uint64) bool
// AddUint64 appends a big-endian, 64-bit value to the byte string.
func (b *Builder) AddUint64(v uint64)
cc @rolandshoemaker
(edited to add AddUint64)
cryptobyte.StringhasReadUint8,ReadUint16,ReadUint24, andReadUint32but noReadUint64.Likewise,
cryptobyte.BuilderhasAddUint8,AddUint16,AddUint24, andAddUint32but noAddUint64.I ran into the omission when writing a parser for a Certificate Transparency Merkle Tree Leaf which uses 64 bit integers for timestamps.
I propose adding:
cc @rolandshoemaker
(edited to add
AddUint64)