String hexZeroPad(String value, num length) { while (value.length < 2 * length + 2) { value = '0x0${value.substring(2)}'; } return value; }