SEC: implement stackinit() functions to simplify initialization and composition of...
[bertos.git] / bertos / sec / hash / md5.c
index 54413267e29a0f561936cf97786943561114240d..8e89907b40084979e8da6b2f77acf9c95624b3b8 100644 (file)
@@ -94,7 +94,7 @@ static void MD5_update(Hash *h, const void* vbuf, size_t len)
  * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
-uint8_t* MD5_final(struct Hash *h)
+static uint8_t* MD5_final(struct Hash *h)
 {
        MD5_Context *ctx = (MD5_Context *)h;
     unsigned count;
@@ -248,5 +248,5 @@ void MD5_init(MD5_Context *ctx)
        ctx->h.update = MD5_update;
        ctx->h.final = MD5_final;
        ctx->h.digest_len = 16;
-       ctx->h.block_len = 16;
+       ctx->h.block_len = 64;
 }