Moved digest size to object, changed to int