diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-04-16 16:45:22 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-04-16 16:45:22 -0400 |
| commit | 6ef7e52c52b4229e115c3b276123f33a664519bb (patch) | |
| tree | bf404006df351e291a41e1c2bc22ae1b02e9fb85 /key/encoding.go | |
| parent | 87fe785ef685a150891413dbb71a3f0e903e3645 (diff) | |
| download | hose-6ef7e52c52b4229e115c3b276123f33a664519bb.zip | |
key encoding function
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 +} |