---*/\r
-{\r
- if ((Char >= L'0') && (Char <= L'9')) {\r
- *Digit = (UINT8) (Char - L'0');\r
- return TRUE;\r
- }\r
-\r
- if ((Char >= L'A') && (Char <= L'F')) {\r
- *Digit = (UINT8) (Char - L'A' + 0x0A);\r
- return TRUE;\r
- }\r
-\r
- if ((Char >= L'a') && (Char <= L'f')) {\r
- *Digit = (UINT8) (Char - L'a' + 0x0A);\r
- return TRUE;\r
- }\r
-\r
- return FALSE;\r
-}\r
-\r
-STATIC\r
-EFI_STATUS\r
-HexStringToBuf (\r
- IN OUT UINT8 *Buf, \r
- IN OUT UINTN *Len,\r
- IN CHAR16 *Str,\r
- OUT UINTN *ConvertedStrLen OPTIONAL\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Converts Unicode string to binary buffer.\r
- The conversion may be partial.\r
- The first character in the string that is not hex digit stops the conversion.\r
- At a minimum, any blob of data could be represented as a hex string.\r
-\r
- Arguments:\r
- Buf - Pointer to buffer that receives the data.\r
- Len - Length in bytes of the buffer to hold converted data.\r
- If routine return with EFI_SUCCESS, containing length of converted data.\r
- If routine return with EFI_BUFFER_TOO_SMALL, containg length of buffer desired.\r
- Str - String to be converted from.\r
- ConvertedStrLen - Length of the Hex String consumed.\r
-\r
- Returns:\r
- EFI_SUCCESS: Routine Success.\r
- EFI_BUFFER_TOO_SMALL: The buffer is too small to hold converted data.\r
- EFI_\r
-\r
---*/\r
-{\r
- UINTN HexCnt;\r
- UINTN Idx;\r
- UINTN BufferLength;\r
- UINT8 Digit;\r
- UINT8 Byte;\r