[PATCH] crypt32: Add support for CRYPT_STRING_HEX to CryptBinaryToStringW.
Alex Henrie
alexhenrie24 at gmail.com
Wed Dec 2 09:11:30 CST 2020
On Wed, Dec 2, 2020 at 6:56 AM Dmitry Timoshkov <dmitry at baikal.ru> wrote:
>
> +static BOOL BinaryToHexRawW(const BYTE *bin, DWORD nbin, DWORD flags, LPWSTR str, DWORD *nstr)
> {
> static const WCHAR hex[] = L"0123456789abcdef";
> DWORD needed;
> @@ -506,6 +506,79 @@ static BOOL BinaryToHexW(const BYTE *bin, DWORD nbin, DWORD flags, LPWSTR str, D
> return TRUE;
> }
>
> +static BOOL binary_to_hexW(const BYTE *bin, DWORD nbin, DWORD flags, LPWSTR str, DWORD *nstr)
> +{
> + static const WCHAR hex[] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
This can be an L-string now. In fact, you can just move the
declaration from BinaryToHexRawW outside of the function and use it in
both BinaryToHexRawW and binary_to_hexW.
-Alex
More information about the wine-devel
mailing list