# otCryptoContext Struct Reference

# otCryptoContext


`#include <openthread/platform/crypto.h>`

Stores the context object for platform APIs.

## Summary

If `OPENTHREAD_CONFIG_CRYPTO_PLATFORM_ALLOCS_CONTEXT` is enabled, the platform allocates and populates this. Otherwise OpenThread core allocates and populates this.

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-crypto-context#structot_crypto_context_1ace204f172037c02df2aa422af59b7b90` | `void *` Pointer to the context. |
| `https://openthread.io/reference/struct/ot-crypto-context#structot_crypto_context_1af55d9781c6448d1a11b79d79eeac444d` | `uint16_t` The length of the context in bytes. |

## Public attributes

### mContext

```
void * otCryptoContext::mContext
```
Pointer to the context.

### mContextSize

```
uint16_t otCryptoContext::mContextSize
```
The length of the context in bytes.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).