fix up the digest() interface