storage: start making digestType and query generic