Software implementation of the SHA1 algorithm.
More...
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Software implementation of the SHA1 algorithm.
- Copyright
- (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
◆ _NOP
◆ _WDRESET
◆ leftRotate
#define leftRotate |
( |
|
x, |
|
|
|
n |
|
) |
| (x) = (((x) << (n)) | ((x) >> (32 - (n)))) |
◆ memcpy_P
◆ strcpy_P
◆ U16
◆ U32
◆ U8
◆ CL_hash()
void CL_hash |
( |
U8 * |
msg, |
|
|
int |
msgBytes, |
|
|
U8 * |
dest |
|
) |
| |
Perform SHA1 hash of data in software.
- Parameters
-
[in] | msg | Data to be hashed |
[in] | msgBytes | Data size in bytes |
[out] | dest | Digest is returned here (20 bytes) |
◆ CL_hashFinal()
Complete the SHA1 hash in software and return the digest.
- Parameters
-
[in] | ctx | Hash context |
[out] | dest | Digest is returned here (20 bytes) |
◆ CL_hashInit()
Initialize context for performing SHA1 hash in software.
- Parameters
-
◆ CL_hashUpdate()
Add arbitrary data to a SHA1 hash.
- Parameters
-
[in] | ctx | Hash context |
[in] | src | Data to be added to the hash |
[in] | nbytes | Data size in bytes |
◆ shaEngine()
void shaEngine |
( |
U32 * |
buf, |
|
|
U32 * |
h |
|
) |
| |