summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/hex.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/hex.go b/lib/hex.go
index 0087f33..98f3210 100644
--- a/lib/hex.go
+++ b/lib/hex.go
@@ -44,16 +44,6 @@ func HexStrToAsciiStr(h string) string {
return a
}
-func ByteToHexStr(b byte) string {
- p := DecToHexChar(uint16(b >> 4))
- q := DecToHexChar(uint16(b & 0xf))
-
- s := string(p)
- s += string(q)
-
- return s
-}
-
func AsciiStrToHexStr(as string) string {
hs := ""
if len(as) < 1 {
@@ -66,3 +56,13 @@ func AsciiStrToHexStr(as string) string {
}
return hs
}
+
+func ByteToHexStr(b byte) string {
+ p := DecToHexChar(uint16(b >> 4))
+ q := DecToHexChar(uint16(b & 0xf))
+
+ s := string(p)
+ s += string(q)
+
+ return s
+}