Refactor specs of Base64String and HexadecimalString for clarity