Validates the format of a hex string via regex.
Hex string to validate for correct format.
Optional
Expected length of hex in bits.
Validates the format of a hex string via regex.