conform to the new digest() interface