Text this: A fast exact sequential algorithm for the partial digest problem