Corrected the calculation of the digest.