BUG: sha1 calls before decoder. Otherwise buf will be empty http://golang.org/pkg/bytes/#Buffer.Bytes