bifurcation / mint

A Minimal TLS 1.3 Implementation in Go
MIT License
224 stars 36 forks source link

Allow serialization of Go maps #216

Closed bifurcation closed 4 years ago

bifurcation commented 4 years ago

This is totally off-piste with regard to the specification, but so are many of the features we have in this repo. The encoding strategy here effectively treats a map[A]B as a []struct{a A; b B}, that is, as a sequence of key/value pairs. In order to be canonical, the encoder sorts the pairs lexically by key.