SemiDrive SSDK Appication Program Interface PTG3.0
sdrv_crypto_mailbox_hash.h
Go to the documentation of this file.
1
9#ifndef SDRV_CRYPTO_MAILBOX_HASH_H
10#define SDRV_CRYPTO_MAILBOX_HASH_H
11
14
15#define HASH_PROMODE_START_TO_END (0)
16#define HASH_PROMODE_START_TO_MIDDLE (1)
17#define HASH_PROMODE_MIDDLE_TO_MIDDLE (2)
18#define HASH_PROMODE_MIDDLE_TO_END (3)
19
23typedef struct {
24 uint8_t cmd_id;
25 uint8_t process_mode;
26 uint8_t rev1[1];
27 uint8_t mode;
28 uint8_t data_ptr[4];
29 uint8_t data_len[4];
30 uint8_t digest_ptr[4];
31 uint8_t predata_len[8];
33
45sdrv_crypto_error_status_e cmd_hash_calc(uint8_t mode, uint8_t *msg,
46 uint32_t msg_bytes, uint8_t *digest);
47
62 uint8_t process_mode,
63 uint8_t *msg,
64 uint32_t msg_bytes,
65 uint8_t *digest,
66 uint64_t predata_len);
67
68#endif
SemiDrive CRYPTO mailbox common api header file.
sdrv_crypto_error_status_e cmd_hash_calc(uint8_t mode, uint8_t *msg, uint32_t msg_bytes, uint8_t *digest)
get hash value.
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.
crypto mailbox trng cmd interface
enum sdrv_crypto_error_status sdrv_crypto_error_status_e
CRYPTO error status return codes.
CRYPTO cmd of HASH.
Definition: sdrv_crypto_mailbox_hash.h:23
uint8_t mode
Definition: sdrv_crypto_mailbox_hash.h:27
uint8_t process_mode
Definition: sdrv_crypto_mailbox_hash.h:25
uint8_t cmd_id
Definition: sdrv_crypto_mailbox_hash.h:24