MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SHA: SHA encryption decryption driver

Overview

The MCUXpresso SDK provides a peripheral driver for the SHA module in MCUXpresso SDK devices.

The driver provides blocking synchronous APIs. The SHA operations are complete (and results are made availabe for further usage) when a function returns. When called, these functions don't return until a SHA operation is complete. These functions use main CPU for simple polling loops to determine operation complete or error status and also for data movements. The driver functions are not re-entrant. These functions provide typical interface to upper layer or application software.

SHA Driver Initialization and Configuration

Clock to the SHA module has to be enabled before using the driver API.

Comments about API usage in RTOS

SHA operations provided by this driver are not re-entrant. Thus, application software shall ensure the SHA module operation is not requested from different tasks or interrupt service routines while an operation is in progress.

SHA Driver Example

Typical use case Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/sha

Modules

 SHA Algorithm API
 

Files

file  fsl_sha.h
 

Data Structures

struct  sha_ctx_t
 Storage type used to save hash context. More...
 

Macros

#define SHA_CTX_SIZE   20
 SHA Context size. More...
 

Enumerations

enum  sha_algo_t {
  kSHA_Sha1,
  kSHA_Sha256
}
 Supported cryptographic block cipher functions for HASH creation. More...
 

Driver version

#define FSL_SHA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 Defines LPC SHA driver version 2.0.0. More...
 

Data Structure Documentation

struct sha_ctx_t

Macro Definition Documentation

#define FSL_SHA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Change log:

  • Version 2.0.0
    • initial version
#define SHA_CTX_SIZE   20

Enumeration Type Documentation

enum sha_algo_t
Enumerator
kSHA_Sha1 

SHA_1.

kSHA_Sha256 

SHA_256.