summaryrefslogtreecommitdiffstats
path: root/lib/hex.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hex.go')
-rw-r--r--lib/hex.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/hex.go b/lib/hex.go
index 98f3210..d680a28 100644
--- a/lib/hex.go
+++ b/lib/hex.go
@@ -66,3 +66,12 @@ func ByteToHexStr(b byte) string {
return s
}
+
+func BytesToHexStr(bs []byte) string {
+ hs := ""
+
+ for i := 0; i < len(bs); i++ {
+ hs += " " + ByteToHexStr(bs[i])
+ }
+ return hs
+}