Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hash_ctx Struct Reference

Structure encoding session parameters. More...

#include <zephyr/crypto/hash.h>

Data Fields

const struct devicedevice
 Device driver instance this crypto context relates to.
void * drv_sessn_state
 Driver-owned session state.
hash_op_t hash_hndlr
 Hash operation handler selected for this session.
bool started
 Multipart hash operation state.
uint16_t flags
 Flags describing how certain fields are interpreted for this session.

Detailed Description

Structure encoding session parameters.

Refer to comments for individual fields to know the contract in terms of who fills what and when w.r.t begin_session() call.

Field Documentation

◆ device

const struct device* hash_ctx::device

Device driver instance this crypto context relates to.

This is populated by hash_begin_session().

◆ drv_sessn_state

void* hash_ctx::drv_sessn_state

Driver-owned session state.

If the driver supports multiple simultaneous crypto sessions, this identifies the specific driver state for this crypto session. Since dynamic memory allocation is not possible, drivers should allocate space at build time for the maximum number of simultaneous sessions they support. This is populated by the driver during hash_begin_session().

◆ flags

uint16_t hash_ctx::flags

Flags describing how certain fields are interpreted for this session.

(A bitmask of CAP_* below.) To be populated by the app before calling hash_begin_session(). An app can obtain the capability flags supported by a hw/driver by calling crypto_query_hwcaps().

◆ hash_hndlr

hash_op_t hash_ctx::hash_hndlr

Hash operation handler selected for this session.

This is populated by the driver during hash_begin_session().

◆ started

bool hash_ctx::started

Multipart hash operation state.

This is true after a multipart hash operation has started.


The documentation for this struct was generated from the following file: