1 2 3 4 5 6 7 8 9
package key import "encoding/hex" func encode(key []byte) []byte { buf := make([]byte, hex.EncodedLen(len(key))) hex.Encode(buf, key) return buf }