diff options
Diffstat (limited to 'src/sha256.c')
-rw-r--r-- | src/sha256.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sha256.c b/src/sha256.c index 0bb29af..00b7319 100644 --- a/src/sha256.c +++ b/src/sha256.c @@ -36,7 +36,7 @@ uint32_t k[64] = { 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; -static void sha256_transform(sha256_ctx *ctx, uint8_t *data) +void sha256_transform(sha256_ctx *ctx, uint8_t *data) { uint32_t a, b, c, d, e, f, g, h, i, j, t1, t2, m[64]; @@ -76,7 +76,7 @@ static void sha256_transform(sha256_ctx *ctx, uint8_t *data) ctx->state[7] += h; } -static void sha256_init(sha256_ctx *ctx) +void sha256_init(sha256_ctx *ctx) { ctx->datalen = 0; ctx->bitlen[0] = 0; @@ -91,7 +91,7 @@ static void sha256_init(sha256_ctx *ctx) ctx->state[7] = 0x5be0cd19; } -static void sha256_update(sha256_ctx *ctx, uint8_t *data, uint32_t len) +void sha256_update(sha256_ctx *ctx, uint8_t *data, uint32_t len) { uint32_t i; @@ -106,7 +106,7 @@ static void sha256_update(sha256_ctx *ctx, uint8_t *data, uint32_t len) } } -static void sha256_final(uint8_t *hash, sha256_ctx *ctx) +void sha256_final(uint8_t *hash, sha256_ctx *ctx) { uint32_t i; @@ -152,7 +152,7 @@ static void sha256_final(uint8_t *hash, sha256_ctx *ctx) } } -extern void sha256_hash(char *hash, const char *data, size_t len) +void sha256_hash(char *hash, const char *data, size_t len) { sha256_ctx ctx; sha256_init(&ctx); |