aboutsummaryrefslogtreecommitdiff
path: root/wasm/sha256.h
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-25 10:40:22 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-25 10:40:22 +0800
commit77456c33a7ee34876f6c860d2888a1442362dcea (patch)
treee53efe3e330312335eeb11be1123c623d3db652a /wasm/sha256.h
parentMerge branch 'master' into irclog (diff)
parentMore C style changes (diff)
downloadpowxy-77456c33a7ee34876f6c860d2888a1442362dcea.tar.gz
powxy-77456c33a7ee34876f6c860d2888a1442362dcea.tar.zst
powxy-77456c33a7ee34876f6c860d2888a1442362dcea.zip
Merge branch 'master' into irclogirclog-v0.1.80
Diffstat (limited to 'wasm/sha256.h')
-rw-r--r--wasm/sha256.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/wasm/sha256.h b/wasm/sha256.h
index bbf9abc..659a5ad 100644
--- a/wasm/sha256.h
+++ b/wasm/sha256.h
@@ -1,21 +1,14 @@
-/*********************************************************************
-* Filename: sha256.h
-* Author: Brad Conte (brad AT bradconte.com)
-* Copyright: Identified to be public domain by ducky
-* Disclaimer: This code is presented "as is" without any guarantees.
-* Details: Defines the API for the corresponding SHA1 implementation.
-*********************************************************************/
+// SPDX-FileContributor: Brad Conte <brad@bradconte.com>
+// Identified to be public domain by ducky
+// Disclaimer: This code is presented "as is" without any guarantees.
#ifndef SHA256_H
#define SHA256_H
-/*************************** HEADER FILES ***************************/
#include <stddef.h>
-/****************************** MACROS ******************************/
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
-/**************************** DATA TYPES ****************************/
typedef unsigned char BYTE; // 8-bit byte
typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines
@@ -26,7 +19,6 @@ typedef struct {
WORD state[8];
} SHA256_CTX;
-/*********************** FUNCTION DECLARATIONS **********************/
void sha256_init(SHA256_CTX * ctx);
void sha256_update(SHA256_CTX * ctx, const BYTE data[], size_t len);
void sha256_final(SHA256_CTX * ctx, BYTE hash[]);