Optimize SHA-1 to hex string conversion