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

Structure encoding session parameters. More...

#include <hash.h>

Data Fields

const struct devicedevice
 The device driver instance this crypto context relates to.
 
void * drv_sessn_state
 If the driver supports multiple simultaneously crypto sessions, this will identify the specific driver state this crypto session relates to.
 
hash_op_t hash_hndlr
 Hash handler set up when the session begins.
 
bool started
 If it has started a multipart hash operation.
 
uint16_t flags
 How certain fields are to be 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

The device driver instance this crypto context relates to.

Will be populated by the begin_session() API.

◆ drv_sessn_state

void* hash_ctx::drv_sessn_state

If the driver supports multiple simultaneously crypto sessions, this will identify the specific driver state this crypto session relates to.

Since dynamic memory allocation is not possible, it is suggested that at build time drivers allocate space for the max simultaneous sessions they intend to support. To be populated by the driver on return from begin_session().

◆ flags

uint16_t hash_ctx::flags

How certain fields are to be 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 handler set up when the session begins.

◆ started

bool hash_ctx::started

If it has started a multipart hash operation.


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