Improve SHA generation