-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ada813
commit 2b8f707
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* Sha256.h -- SHA-256 Hash | ||
2016-11-04 : Marc Bevand : A few changes to make it more self-contained | ||
2010-06-11 : Igor Pavlov : Public domain */ | ||
|
||
#ifndef __CRYPTO_SHA256_H | ||
#define __CRYPTO_SHA256_H | ||
|
||
#define SHA256_DIGEST_SIZE 32 | ||
|
||
typedef struct | ||
{ | ||
uint32_t state[8]; | ||
uint64_t count; | ||
uint8_t buffer[64]; | ||
} CSha256; | ||
|
||
void Sha256_Init(CSha256 *p); | ||
void Sha256_Update(CSha256 *p, const uint8_t *data, size_t size); | ||
void Sha256_Final(CSha256 *p, uint8_t *digest); | ||
void Sha256_Onestep(const uint8_t *data, size_t size, uint8_t *digest); | ||
|
||
#endif |