adding << ostream to output digest
defining overloaded << op, for a templatic class, outside the class body is excruciatingly painful; you've pre declare the friend func, then to predec the friend, you've to predeclare the class itself; yet again, assert friendship with <> in class body and in the end write those three lines of actual logic outside the body. It is way better to put them inside.