> 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/adk-5.0-programmers-guide/sec_8h_source.md).

# sec.h

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

```cpp
 1 /****************************************************************************
 2 * Product: InFusion
 3 * Company: Verifone
 4 * Author: GSS R&D Germany
 5 * Content: SDI-Server
 6 ****************************************************************************/
 7 
 8 #ifndef _SEC_H_
 9 #define _SEC_H_
 10 
 11 #include "csdcontainer.h"
 12 #include "sec/libsec.h"
 13 
 14 #define CLA_SEC 0x70 
 15 
 16 #define INS_SEC_OPEN 0x00 
 17 #define INS_SEC_CLOSE 0x01 
 18 #define INS_SEC_ENCRYPT 0x02 
 19 #define INS_SEC_DECRYPT 0x03 
 20 #define INS_SEC_SIGN 0x04 
 21 #define INS_SEC_VERIFY 0x05 
 22 #define INS_SEC_UPDATE_KEY 0x06 
 23 #define INS_SEC_SET_KEY_SET 0x07 
 24 #define INS_SEC_GET_ENCRYPTED_PIN 0x08 
 25 #define INS_SEC_GET_KEY_INVENTORY 0x09 
 26 #define INS_SEC_GET_KEY_DATA 0x0A 
 27 #define INS_SEC_GET_STATUS 0x0B 
 28 #define INS_SEC_GET_VERSION 0x0C 
 29 
 30 #ifdef __cplusplus
 31 extern "C"
 32 {
 33 #endif
 34 
 35 bool isAdeEnabled(void);
 36 
 47 void handleSec(unsigned short msgBufSize, unsigned char *msg, unsigned short msgSize, unsigned short rspBufSize, unsigned char *rsp, unsigned short *rspSize);
 48 int findCryptoHandle(struct BTLVNode *xBtlv, struct BTLVNode **node, com_adksec_cmd::secHandle_t *handle);
 49 
 50 int SEC_getEncryptedPin(struct BTLVNode *xBtlv, com_adksec_cmd::secError &errorCode);
 51 
 52 bool getSecHandle(void *sdihandle, com_adksec_cmd::secHandle_t &h, unsigned idx);
 53 void cleanUpSecHandles(void *sdihandle);
 54 
 55 #ifdef __cplusplus
 56 }
 57 #endif
 58 
 59 #endif // _SEC_H_
```


---

# 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/adk-5.0-programmers-guide/sec_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.
