Example of cryptographic digest code.
#ifndef DEBUG
#define DEBUG
#endif
#include <ucommon-config.h>
#include <stdio.h>
int main(int argc, char **argv)
{
md5.
puts(
"this is some text");
assert(
eq(
"684d9d89b9de8178dcd80b7b4d018103", *md5));
md5 = "sha";
md5.puts("something else");
assert(!
eq(
"684d9d89b9de8178dcd80b7b4d018103", *md5));
md5 = "md5";
md5.puts("this is some text");
assert(
eq(
"684d9d89b9de8178dcd80b7b4d018103", *md5));
secure::keybytes key = md5.
key();
assert(
eq(
"684d9d89b9de8178dcd80b7b4d018103", key.hex()));
assert(
eq(
"684d9d89b9de8178dcd80b7b4d018103", *dig));
return 0;
}