D Documentation  
MD5_CTX
struct MD5_CTX

Use this, when the data you want to compute is buffered. Otherwise use sum.

Example:
import std.md5;

int main(char[][] args) {
  ubyte[16]   md5sum;
  
  MD5_CTX     my_md5_ctx;
  
  my_md5_ctx.start();
  
  // first block of data
  my_md5_ctx.update("Hello");
  
  /* get second block of data */
  /* in this example we do this the stupiest way :-) */
  char[]      second  = " World!";
  
  // second block of data
  my_md5_ctx.update(second);
  
  my_md5_ctx.finish(md5sum);
  
  printDigest(md5sum);
  return 0;
}

Output:
ed076287532e86365e841e92bfc50d8c

See also:
sum, start, update, finish
Created using PHP docwiki written by Markus Dangl. Best viewed with Mozilla Firefox.