-void MD5::update(const char *data, unsigned len)
-{
- if(unprocessed_bytes && unprocessed_bytes+len>=64)
- {
- unsigned needed = 64-unprocessed_bytes;
- copy(data, data+needed, unprocessed+unprocessed_bytes);
- process_block(unprocessed);
- data += needed;
- len -= needed;
- unprocessed_bytes = 0;
- }
-
- while(len>=64)
- {
- process_block(data);
- data += 64;
- len -= 64;
- }
-
- if(len>0)
- {
- copy(data, data+len, unprocessed+unprocessed_bytes);
- unprocessed_bytes += len;
- }
-}
-