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();
my_md5_ctx.update("Hello");
char[] second = " World!";
my_md5_ctx.update(second);
my_md5_ctx.finish(md5sum);
printDigest(md5sum);
return 0;
}
|
Output:
ed076287532e86365e841e92bfc50d8c
|
See also:
sum,
start,
update,
finish
|