SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures | Functions
sdrv_crypto_mailbox_hash.h File Reference
#include "sdrv_crypto_mailbox_common.h"
#include "sdrv_crypto_mailbox_trng.h"

Go to the source code of this file.

Data Structures

struct  cmd_hash_t
 

Functions

sdrv_crypto_error_status_e cmd_hash_calc (uint8_t mode, uint8_t *msg, uint32_t msg_bytes, uint8_t *digest)
 
sdrv_crypto_error_status_e cmd_hash_update_calc (uint8_t mode, uint8_t process_mode, uint8_t *msg, uint32_t msg_bytes, uint8_t *digest, uint64_t predata_len)
 

Detailed Description

Macro Definition Documentation

◆ HASH_PROMODE_MIDDLE_TO_END

#define HASH_PROMODE_MIDDLE_TO_END   (3)

◆ HASH_PROMODE_MIDDLE_TO_MIDDLE

#define HASH_PROMODE_MIDDLE_TO_MIDDLE   (2)

◆ HASH_PROMODE_START_TO_END

#define HASH_PROMODE_START_TO_END   (0)

◆ HASH_PROMODE_START_TO_MIDDLE

#define HASH_PROMODE_START_TO_MIDDLE   (1)

Function Documentation

◆ cmd_hash_calc()

sdrv_crypto_error_status_e cmd_hash_calc ( uint8_t  mode,
uint8_t *  msg,
uint32_t  msg_bytes,
uint8_t *  digest 
)

get hash value.

This function get hash.

Parameters
[in]modehash mode.
[in]msgmsg buff.
[in]msg_bytesmsg len.
[out]digesthash value.
Returns
CMD_RETURN_SUCCESS or error code.

◆ cmd_hash_update_calc()

sdrv_crypto_error_status_e cmd_hash_update_calc ( uint8_t  mode,
uint8_t  process_mode,
uint8_t *  msg,
uint32_t  msg_bytes,
uint8_t *  digest,
uint64_t  predata_len 
)

get hash value.

This function get segment-hash.

Parameters
[in]modehash mode.
[in]process_modesegment-hash mode.
[in]msgmsg buff.
[in]msg_bytesmsg len.
[out]digesthash value.
[in]bytelength of previously processed messages.
Returns
CMD_RETURN_SUCCESS or error code.