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