support custom digest for key