> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/sdi_2src_2hexutil_8h_source.md).

# hexutil.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/sdi_2src_2hexutil_8h.md)

```cpp
 1 #ifndef SDI_HEXUTIL_H
 2 #define SDI_HEXUTIL_H
 3 
 4 #include <string>
 5 #include "csd.h"
 6 
 7 namespace sdi
 8 {
 9 
 19  int hextobin(unsigned char *dst, const unsigned char *src, int srclen);
 20 
 27  int hextobin(csd::csd_data &dst, const unsigned char *src, int srclen);
 28 
 37  void bintohex(unsigned char *dst, const unsigned char *src, int srclen);
 38 
 45  void bintohexstring(char *dst, const unsigned char *src, int srclen);
 46 
 52  void bintohexstring(std::string &dst, const unsigned char *src, int srclen);
 53 
 59  void bintohexstring(csd::csd_string &dst, const unsigned char *src, int srclen);
 60 
 68  void bintotrack2(unsigned char *dst, const unsigned char *src, int srclen);
 69 
 75  void bintotrack2string(csd::csd_string &dst, const unsigned char *src, int srclen);
 76 
 84  int track2tobin(unsigned char *dst, const unsigned char *src, int srclen);
 85 
 91  int track2tobin(csd::csd_data &dst, const unsigned char *src, int srclen);
 92 
 93 } // namespace
 94 
 95 #endif
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/sdi_2src_2hexutil_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
