![Logo](ti_logo.svg) |
AM64x MCU+ SDK
08.01.00
|
|
Go to the documentation of this file.
49 #include <security/crypto.h>
65 #define CRYPTO_SHA_AUTHMODE_NULL (0U)
67 #define CRYPTO_SHA_AUTHMODE_SHA1 (1U)
69 #define CRYPTO_SHA_AUTHMODE_SHA2_224 (2U)
71 #define CRYPTO_SHA_AUTHMODE_SHA2_256 (3U)
73 #define CRYPTO_SHA_AUTHMODE_SHA2_384 (4U)
75 #define CRYPTO_SHA_AUTHMODE_SHA2_512 (5U)
77 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA1 (6U)
79 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_224 (7U)
81 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_256 (8U)
83 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_384 (9U)
85 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_512 (10U)
101 typedef struct Crypto_ShaParams_s
118 typedef struct Crypto_ShaFxns_s
int32_t Crypto_shaStarts(Crypto_ShaHandle handle)
This function starts a Secure Hash Algorithm (SHA ) checksum calculation.
int32_t Crypto_shaFinish(Crypto_ShaHandle handle, uint8_t *output)
This function finishes the Secure Hash Algorithm (SHA ) operation, and writes the result to the outpu...
int32_t Crypto_shaUpdate(Crypto_ShaHandle handle, const uint8_t *input, uint32_t ilen)
This function feeds an input buffer into an ongoing Secure Hash Algorithm (SHA ) checksum calculation...
Crypto_ShaUpdateFxn updateFxn
Definition: crypto_sha.h:126
Crypto_ShaStartFxn startFxn
Definition: crypto_sha.h:124
int32_t(* Crypto_ShaFinishFxn)(Crypto_ShaContext *ctx, uint8_t *output)
Definition: crypto_sha.h:114
int32_t(* Crypto_ShaSingleShotFxn)(Crypto_ShaContext *ctx, const uint8_t *input, uint32_t ilen, uint8_t *output)
Definition: crypto_sha.h:115
uint32_t authMode
Definition: crypto_sha.h:103
Crypto_ShaSingleShotFxn singleShotFxn
Definition: crypto_sha.h:130
uintptr_t rsv[60U]
Definition: crypto_sha.h:143
CRYPTO SHA global configuration array.
Definition: crypto_sha.h:154
Crypto_ShaParams params
Definition: crypto_sha.h:137
Crypto_ShaCloseFxn closeFxn
Definition: crypto_sha.h:122
int32_t(* Crypto_ShaUpdateFxn)(Crypto_ShaContext *ctx, const uint8_t *input, uint32_t ilen)
Definition: crypto_sha.h:113
Parameters passed during Crypto_shaOpen()
Definition: crypto_sha.h:102
Driver implementation callbacks.
Definition: crypto_sha.h:119
void * drvHandle
Definition: crypto_sha.h:141
int32_t(* Crypto_ShaCloseFxn)(Crypto_ShaContext *ctx)
Definition: crypto_sha.h:111
Crypto_ShaFxns * fxns
Definition: crypto_sha.h:139
int32_t Crypto_shaSingleShot(Crypto_ShaHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
This function calculates the Secure Hash Algorithm (SHA) checksum of a buffer.
Crypto_ShaConfig gCryptoShaConfig[CRYPTO_NUM_TYPE]
Externally defined SHA driver configuration array.
Crypto_ShaFxns * fxns
Definition: crypto_sha.h:155
void * Crypto_ShaHandle
Handle to the Crypto SHA driver returned by Crypto_shaOpen()
Definition: crypto_sha.h:89
uint32_t type
Definition: crypto_sha.h:105
Crypto_ShaHandle Crypto_shaOpen(Crypto_ShaContext *ctx, const Crypto_ShaParams *params)
This function gives the configuration based on type.
CRYPTO SHA driver context.
Definition: crypto_sha.h:136
Crypto_ShaFinishFxn finishFxn
Definition: crypto_sha.h:128
int32_t Crypto_shaClose(Crypto_ShaHandle handle)
This function clears a Secure Hash Algorithm (SHA ) context.
Crypto_ShaOpenFxn openFxn
Definition: crypto_sha.h:120
int32_t(* Crypto_ShaOpenFxn)(Crypto_ShaContext *ctx, const Crypto_ShaParams *params)
callback functions declarations
Definition: crypto_sha.h:110
int32_t(* Crypto_ShaStartFxn)(Crypto_ShaContext *ctx)
Definition: crypto_sha.h:112
void Crypto_ShaParams_init(Crypto_ShaParams *params)
Set default parameters in the Crypto_ShaParams structure.