Account
ArmsysApi 0.12.18 |
Macros | |
#define | SHA256_SHR(bits, word) ((word) >> (bits)) |
#define | SHA256_ROTL(bits, word) (((word) << (bits)) | ((word) >> (32-(bits)))) |
#define | SHA256_ROTR(bits, word) (((word) >> (bits)) | ((word) << (32-(bits)))) |
#define | SHA256_SIGMA0(word) (SHA256_ROTR( 2,word) ^ SHA256_ROTR(13,word) ^ SHA256_ROTR(22,word)) |
#define | SHA256_SIGMA1(word) (SHA256_ROTR( 6,word) ^ SHA256_ROTR(11,word) ^ SHA256_ROTR(25,word)) |
#define | SHA256_sigma0(word) (SHA256_ROTR( 7,word) ^ SHA256_ROTR(18,word) ^ SHA256_SHR( 3,word)) |
#define | SHA256_sigma1(word) (SHA256_ROTR(17,word) ^ SHA256_ROTR(19,word) ^ SHA256_SHR(10,word)) |
#define | SHA224_256AddLength(context, length) |
Functions | |
static int | SHA224_256Reset (SHA256Context *context, uint32_t *H0) |
static void | SHA224_256ProcessMessageBlock (SHA256Context *context) |
static void | SHA224_256Finalize (SHA256Context *context, uint8_t Pad_Byte) |
static void | SHA224_256PadMessage (SHA256Context *context, uint8_t Pad_Byte) |
static int | SHA224_256ResultN (SHA256Context *context, uint8_t Message_Digest[], int HashSize) |
int | SHA256Reset (SHA256Context *context) |
int | SHA256Input (SHA256Context *context, const uint8_t *message_array, unsigned int length) |
int | SHA256Result (SHA256Context *context, uint8_t Message_Digest[SHA256HashSize]) |
Variables | |
static uint32_t | addTemp |
static uint32_t | SHA256_H0 [SHA256HashSize/4] |
Macro Definition Documentation
◆ SHA224_256AddLength
#define SHA224_256AddLength | ( | context, | |
length | |||
) |
Value:
(addTemp = (context)->Length_Low, (context)->Corrupted = \
(++(context)->Length_High == 0) ? shaInputTooLong : \
(context)->Corrupted )
Definition: sha.h:95
◆ SHA256_ROTL
#define SHA256_ROTL | ( | bits, | |
word | |||
) | (((word) << (bits)) | ((word) >> (32-(bits)))) |
◆ SHA256_ROTR
#define SHA256_ROTR | ( | bits, | |
word | |||
) | (((word) >> (bits)) | ((word) << (32-(bits)))) |
◆ SHA256_SHR
#define SHA256_SHR | ( | bits, | |
word | |||
) | ((word) >> (bits)) |
◆ SHA256_SIGMA0
#define SHA256_SIGMA0 | ( | word | ) | (SHA256_ROTR( 2,word) ^ SHA256_ROTR(13,word) ^ SHA256_ROTR(22,word)) |
◆ SHA256_sigma0
#define SHA256_sigma0 | ( | word | ) | (SHA256_ROTR( 7,word) ^ SHA256_ROTR(18,word) ^ SHA256_SHR( 3,word)) |
◆ SHA256_SIGMA1
#define SHA256_SIGMA1 | ( | word | ) | (SHA256_ROTR( 6,word) ^ SHA256_ROTR(11,word) ^ SHA256_ROTR(25,word)) |
◆ SHA256_sigma1
#define SHA256_sigma1 | ( | word | ) | (SHA256_ROTR(17,word) ^ SHA256_ROTR(19,word) ^ SHA256_SHR(10,word)) |
Function Documentation
◆ SHA224_256Finalize()
| static |
◆ SHA224_256PadMessage()
| static |
◆ SHA224_256ProcessMessageBlock()
| static |
◆ SHA224_256Reset()
| static |
◆ SHA224_256ResultN()
| static |
◆ SHA256Input()
int SHA256Input | ( | SHA256Context * | context, |
const uint8_t * | message_array, | ||
unsigned int | length | ||
) |
◆ SHA256Reset()
int SHA256Reset | ( | SHA256Context * | context | ) |
◆ SHA256Result()
int SHA256Result | ( | SHA256Context * | context, |
uint8_t | Message_Digest[SHA256HashSize] | ||
) |
Variable Documentation
◆ addTemp
| static |
◆ SHA256_H0
| static |
Initial value:
= {
0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19
}
Generated by
