returning computed digest from helper method