summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/crypto-algorithms
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/crypto-algorithms')
-rw-r--r--extmod/crypto-algorithms/sha256.c8
-rw-r--r--extmod/crypto-algorithms/sha256.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/extmod/crypto-algorithms/sha256.c b/extmod/crypto-algorithms/sha256.c
index bbc30ece7e..82e5d9c7bd 100644
--- a/extmod/crypto-algorithms/sha256.c
+++ b/extmod/crypto-algorithms/sha256.c
@@ -41,7 +41,7 @@ static const WORD k[64] = {
};
/*********************** FUNCTION DEFINITIONS ***********************/
-static void sha256_transform(SHA256_CTX *ctx, const BYTE data[])
+static void sha256_transform(CRYAL_SHA256_CTX *ctx, const BYTE data[])
{
WORD a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
@@ -82,7 +82,7 @@ static void sha256_transform(SHA256_CTX *ctx, const BYTE data[])
ctx->state[7] += h;
}
-void sha256_init(SHA256_CTX *ctx)
+void sha256_init(CRYAL_SHA256_CTX *ctx)
{
ctx->datalen = 0;
ctx->bitlen = 0;
@@ -96,7 +96,7 @@ void sha256_init(SHA256_CTX *ctx)
ctx->state[7] = 0x5be0cd19;
}
-void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len)
+void sha256_update(CRYAL_SHA256_CTX *ctx, const BYTE data[], size_t len)
{
WORD i;
@@ -111,7 +111,7 @@ void sha256_update(SHA256_CTX *ctx, const BYTE data[], size_t len)
}
}
-void sha256_final(SHA256_CTX *ctx, BYTE hash[])
+void sha256_final(CRYAL_SHA256_CTX *ctx, BYTE hash[])
{
WORD i;
diff --git a/extmod/crypto-algorithms/sha256.h b/extmod/crypto-algorithms/sha256.h
index 7123a30dd4..caa1f81020 100644
--- a/extmod/crypto-algorithms/sha256.h
+++ b/extmod/crypto-algorithms/sha256.h
@@ -24,11 +24,11 @@ typedef struct {
WORD datalen;
unsigned long long bitlen;
WORD state[8];
-} SHA256_CTX;
+} CRYAL_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[]);
+void sha256_init(CRYAL_SHA256_CTX *ctx);
+void sha256_update(CRYAL_SHA256_CTX *ctx, const BYTE data[], size_t len);
+void sha256_final(CRYAL_SHA256_CTX *ctx, BYTE hash[]);
#endif // SHA256_H