diff options
Diffstat (limited to 'lib/hex.go')
-rw-r--r-- | lib/hex.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 +} |