Reimplementation of SLV_MD class