go-macaroon / macaroon

A native Go implementation of macaroons
BSD 3-Clause "New" or "Revised" License
182 stars 24 forks source link

bring binary serialization in line with libmacaroons #6

Closed rogpeppe closed 9 years ago

rogpeppe commented 9 years ago

Each field contains a trailing newline character.

Also change signature calculation to be in line with libmacaroons.

Because libmacaroons uses the sha256 output directly as the encryption key for third party caveat verification ids, we change the representation of hashes to be an array rather than a slice. This means that if the relative sizes change at some point in the future (for example if a different hash algorithm is used), the compiler will tell us that there is a problem.

mhilton commented 9 years ago

:+1: LGTM with a typo to fix.

cmars commented 9 years ago

Just a question about a potential negative array index. Otherwise LGTM.