summaryrefslogtreecommitdiff
path: root/extmod/crypto-algorithms/sha256.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-12-20 16:57:57 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-12-20 23:14:47 +0200
commit1b7f62241023fdd000ee011824679a34d615c722 (patch)
treea68d1ee99adca06d4aec138887ba8de507c85fd2 /extmod/crypto-algorithms/sha256.c
parent664bc44f302ca9cbed02788fea4414b815b1ac65 (diff)
extmod/moduhashlib: Add namespace prefix for crypto-algorithms/sha256.h.
Everyone loves to names similar things the same, then there're conflicts between different libraries. The namespace prefix used is "CRYAL_", which is weird, and that's good, as that minimizes chance of another conflict.
Diffstat (limited to 'extmod/crypto-algorithms/sha256.c')
-rw-r--r--extmod/crypto-algorithms/sha256.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extmod/crypto-algorithms/sha256.c b/extmod/crypto-algorithms/sha256.c
index bbc30ece7..82e5d9c7b 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;