[PATCH] crypt32: Add support for CRYPT_STRING_HEX to CryptBinaryToStringW.

Dmitry Timoshkov dmitry at baikal.ru
Wed Dec 2 09:35:56 CST 2020


Alex Henrie <alexhenrie24 at gmail.com> wrote:

> 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.

Thanks for the suggestion, I missed this during resend. However there must be
something else that prevented this patch to be accepted, since conversion to
using wine-char string literals happend after this patch was sent first time.
If there are no other requests (Alexandre?) I'll resubmit with this change.

-- 
Dmitry.



More information about the wine-devel mailing list