BytesToString() converts a byte slice to a hexadecimal string
(b []byte)
| 535 | |
| 536 | // BytesToString() converts a byte slice to a hexadecimal string |
| 537 | func BytesToString(b []byte) string { |
| 538 | // hex encode the bytes into a string |
| 539 | return hex.EncodeToString(b) |
| 540 | } |
| 541 | |
| 542 | // StringToBytes() converts a hexadecimal string back into a byte slice |
| 543 | func StringToBytes(s string) ([]byte, ErrorI) { |
no outgoing calls