When dealing with something like a sha256
hash which has a known length of 32 bytes– is it more idiomatic to work with []byte
slices or [32]byte
arrays?
I'm a bit new to go– but intuitively it feels like while working with a [32]byte
array to store a hash is nice and explicit, it's actually quite cumbersome to manipulate and requires all sorts of strange things like copying the array into a new buffer slice to manipulate as []byte
.