Updated digest.
Updated digest func && Updated test cases && Passed all test cases.