Move digest functions to their own file and prefix