CC23x0r2DriverLibrary
sha2sw_common.h File Reference

Detailed Description

Definitions common across all SHA2 SW modules.

============================================================================

Overview

Provides top-level general purpose SHA2 SW definitions such as error return codes and enumerations.

#include <stddef.h>
#include <stdint.h>
#include "sha2sw_config.h"
Include dependency graph for sha2sw_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHA2SW_224_OR_256_ROUNDS   ((uint8_t)64u)
 Number of rounds used in the SHA2 224 and 256 algorithms. More...
 
#define SHA2SW_384_OR_512_ROUNDS   ((uint8_t)80u)
 Number of rounds used in the SHA2 384 and 512 algorithms. More...
 
#define SHA2SW_224_OR_256_BLOCK_SIZE   ((uint8_t)64u)
 Number of bytes in the block of the SHA2 224 and 256 algorithms. More...
 
#define SHA2SW_384_OR_512_BLOCK_SIZE   ((uint8_t)128u)
 Number of bytes in the block of the SHA2 384 and 512 algorithms. More...
 
#define SHA2SW_MAX_MESSAGE_BIT_LENGTH   ((uint32_t)0x20000000u)
 The maximum number of bits this implementation supports in the input message/data. More...
 
#define SHA2SW_STATUS_SUCCESS   ((int_fast16_t)0)
 Successful status code. More...
 
#define SHA2SW_STATUS_ERROR   ((int_fast16_t)-100)
 Generic error status code. More...
 
#define SHA2SW_STATUS_UNSUPPORTED   ((int_fast16_t)-102)
 Requested operation is not supported. More...
 
#define SHA2SW_STATUS_LENGTH_TOO_LARGE   ((int_fast16_t)-103)
 Too many data bytes have been requested to be hashed. More...
 
#define SHA2SW_STATUS_NULL_INPUT   ((int_fast16_t)-104)
 Input value was NULL. More...
 

Enumerations

enum  SHA2SW_HashType { SHA2SW_HASH_TYPE_256 = 0, SHA2SW_HASH_TYPE_512 = 3 }
 Enum for the hash types supported by the library. More...
 

Macro Definition Documentation

§ SHA2SW_224_OR_256_ROUNDS

#define SHA2SW_224_OR_256_ROUNDS   ((uint8_t)64u)

Number of rounds used in the SHA2 224 and 256 algorithms.

§ SHA2SW_384_OR_512_ROUNDS

#define SHA2SW_384_OR_512_ROUNDS   ((uint8_t)80u)

Number of rounds used in the SHA2 384 and 512 algorithms.

§ SHA2SW_224_OR_256_BLOCK_SIZE

#define SHA2SW_224_OR_256_BLOCK_SIZE   ((uint8_t)64u)

Number of bytes in the block of the SHA2 224 and 256 algorithms.

§ SHA2SW_384_OR_512_BLOCK_SIZE

#define SHA2SW_384_OR_512_BLOCK_SIZE   ((uint8_t)128u)

Number of bytes in the block of the SHA2 384 and 512 algorithms.

§ SHA2SW_MAX_MESSAGE_BIT_LENGTH

#define SHA2SW_MAX_MESSAGE_BIT_LENGTH   ((uint32_t)0x20000000u)

The maximum number of bits this implementation supports in the input message/data.

Enumeration Type Documentation

§ SHA2SW_HashType

Enum for the hash types supported by the library.

Enumerator
SHA2SW_HASH_TYPE_256 
SHA2SW_HASH_TYPE_512