code: func isHex(str string) bool {
  	if len(str)%2 != 0 {
  		return false
  	}
  	for _, c := range []byte(str) {
  		if !isHexCharacter(c) {
  			return false
  		}
  	}
  	return true
  }
docs: // isHex validates whether each byte is valid hexadecimal string.