The x/crypto/cryptobyte package currently supports methods on the Builder and String for adding and reading uint8, uint16, uint24, uint32, and uint64 values. uint48 values are useful when working with protocols such as DTLS, which uses a uint48 value for record sequence numbers.
This proposal involves introducing the two following methods:
func (b *Builder) AddUint48(v uint64)
func (s *String) ReadUint48(out *uint64) bool
The
x/crypto/cryptobytepackage currently supports methods on theBuilderandStringfor adding and readinguint8,uint16,uint24,uint32, anduint64values.uint48values are useful when working with protocols such as DTLS, which uses auint48value for record sequence numbers.This proposal involves introducing the two following methods: