Move Hex from WinStd to stdex

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2022-02-03 15:12:39 +01:00
parent a254dd527a
commit 19c523509b
8 changed files with 12 additions and 9 deletions

View File

@ -544,7 +544,7 @@ namespace eapxml
#pragma once
#include <WinStd/Hex.h>
#include <stdex/hex>
#include <stdex/base64>
#include <assert.h>
@ -726,7 +726,7 @@ namespace eapxml
winstd::bstr bstr;
HRESULT hr = get_element_value(pXmlParent, bstrElementName, bstr, ppXmlElement);
if (SUCCEEDED(hr)) {
winstd::hex_dec dec;
stdex::hex_dec dec;
bool is_last;
dec.decode(aValue, is_last, (BSTR)bstr, bstr.length());
}
@ -875,7 +875,7 @@ namespace eapxml
inline HRESULT put_element_hex(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrElementName, _In_opt_z_ const BSTR bstrNamespace, _In_bytecount_(nValueLen) LPCVOID pValue, _In_ SIZE_T nValueLen, _Out_opt_ winstd::com_obj<IXMLDOMElement> *ppXmlElement)
{
std::wstring sHex;
winstd::hex_enc enc;
stdex::hex_enc enc;
enc.encode(sHex, pValue, nValueLen);
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(sHex), ppXmlElement);
}
@ -960,7 +960,7 @@ namespace eapxml
winstd::bstr bstr;
HRESULT hr = get_attrib_value(pXmlParent, bstrAttributeName, &bstr);
if (SUCCEEDED(hr)) {
winstd::hex_dec dec;
stdex::hex_dec dec;
bool is_last;
dec.decode(aValue, is_last, (BSTR)bstr, bstr.length());
}
@ -1007,7 +1007,7 @@ namespace eapxml
inline HRESULT put_attrib_hex(_In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrAttributeName, _In_bytecount_(nValueLen) LPCVOID pValue, _In_ SIZE_T nValueLen)
{
std::wstring sHex;
winstd::hex_enc enc;
stdex::hex_enc enc;
enc.encode(sHex, pValue, nValueLen);
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(sHex));
}

View File

@ -11,7 +11,7 @@
#include "../../EAPBase/include/Module.h"
#include <WinStd/Hex.h>
#include <stdex/hex>
#include <Windows.h>
#include <EapHostError.h> // include after Windows.h

View File

@ -7,6 +7,7 @@
#include "PCH.h"
using namespace std;
using namespace stdex;
using namespace winstd;

View File

@ -12,7 +12,7 @@
#include "../../EAPBase/include/Module.h"
#include <WinStd/Hex.h>
#include <stdex/hex>
#include <Windows.h>
#include <EapHostError.h> // include after Windows.h

View File

@ -9,6 +9,7 @@
#pragma comment(lib, "Secur32.lib")
using namespace std;
using namespace stdex;
using namespace winstd;

View File

@ -7,6 +7,7 @@
#include "PCH.h"
using namespace std;
using namespace stdex;
using namespace winstd;

@ -1 +1 @@
Subproject commit 880fd34e16d7f6624b7aab64b29a958c6a7ab388
Subproject commit cd025b449a31cebde7f8b2ac85330f127f7e383d

@ -1 +1 @@
Subproject commit 4521ea8f00379099888884bc8aa3c7a3894d6b9f
Subproject commit f76ece6ca5c6f91276c2845ec7c677fc9773d452