diff options
Diffstat (limited to 'key/encoding.go')
| -rw-r--r-- | key/encoding.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/key/encoding.go b/key/encoding.go new file mode 100644 index 0000000..11abdd6 --- /dev/null +++ b/key/encoding.go @@ -0,0 +1,9 @@ +package key + +import "encoding/hex" + +func encode(key []byte) []byte { + buf := make([]byte, hex.EncodedLen(len(key))) + hex.Encode(buf, key) + return buf +} |