|
|
@ -7,11 +7,13 @@ import ( |
|
|
|
"strings" |
|
|
|
) |
|
|
|
|
|
|
|
// modhex character table for encoding
|
|
|
|
const modhexTable = "cbdefghijklnrtuv" |
|
|
|
|
|
|
|
var modhexMap map[byte]byte |
|
|
|
|
|
|
|
func init() { |
|
|
|
// create a map from byte to modhex for decoding
|
|
|
|
modhexMap = make(map[byte]byte) |
|
|
|
for i, v := range []byte(modhexTable) { |
|
|
|
modhexMap[v] = byte(i) |
|
|
|