+ * Update block.
+ */
+void md2_update(Md2Context *context, const void *_block_in, size_t block_len)
+{
+
+ const uint8_t *block_in;
+ size_t cpy_len;
+
+
+ block_in = (const uint8_t *)_block_in;
+
+ while(block_len > 0)
+ {
+ /*
+ * Choose a number of block that fill input context buffer.
+ */
+ cpy_len = MIN(block_len, CONFIG_MD2_BLOCK_LEN - context->counter);
+
+
+ /*
+ * Copy in the buffer input block.
+ */
+ memcpy(&context->buffer[context->counter], block_in, cpy_len);
+
+ /*
+ * Update a context counter, input block length and remaning
+ * context buffer block lenght.
+ */
+ context->counter += cpy_len;
+ block_len -= cpy_len;
+ block_in += cpy_len;
+
+ /*
+ * If buffer is full, compute it.
+ */
+ if (context->counter >= CONFIG_MD2_BLOCK_LEN)
+ {
+ md2_compute(context->state, context->checksum, context->buffer);
+ context->counter = 0;
+ }
+ }
+
+
+}
+/**
+ * Ends an MD2 message digest operation.
+ * This fuction take an context and return a pointer
+ * to context state.