Move Hex from WinStd to stdex
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
a254dd527a
commit
19c523509b
@ -544,7 +544,7 @@ namespace eapxml
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <WinStd/Hex.h>
|
#include <stdex/hex>
|
||||||
#include <stdex/base64>
|
#include <stdex/base64>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -726,7 +726,7 @@ namespace eapxml
|
|||||||
winstd::bstr bstr;
|
winstd::bstr bstr;
|
||||||
HRESULT hr = get_element_value(pXmlParent, bstrElementName, bstr, ppXmlElement);
|
HRESULT hr = get_element_value(pXmlParent, bstrElementName, bstr, ppXmlElement);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
winstd::hex_dec dec;
|
stdex::hex_dec dec;
|
||||||
bool is_last;
|
bool is_last;
|
||||||
dec.decode(aValue, is_last, (BSTR)bstr, bstr.length());
|
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)
|
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;
|
std::wstring sHex;
|
||||||
winstd::hex_enc enc;
|
stdex::hex_enc enc;
|
||||||
enc.encode(sHex, pValue, nValueLen);
|
enc.encode(sHex, pValue, nValueLen);
|
||||||
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(sHex), ppXmlElement);
|
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(sHex), ppXmlElement);
|
||||||
}
|
}
|
||||||
@ -960,7 +960,7 @@ namespace eapxml
|
|||||||
winstd::bstr bstr;
|
winstd::bstr bstr;
|
||||||
HRESULT hr = get_attrib_value(pXmlParent, bstrAttributeName, &bstr);
|
HRESULT hr = get_attrib_value(pXmlParent, bstrAttributeName, &bstr);
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
winstd::hex_dec dec;
|
stdex::hex_dec dec;
|
||||||
bool is_last;
|
bool is_last;
|
||||||
dec.decode(aValue, is_last, (BSTR)bstr, bstr.length());
|
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)
|
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;
|
std::wstring sHex;
|
||||||
winstd::hex_enc enc;
|
stdex::hex_enc enc;
|
||||||
enc.encode(sHex, pValue, nValueLen);
|
enc.encode(sHex, pValue, nValueLen);
|
||||||
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(sHex));
|
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(sHex));
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "../../EAPBase/include/Module.h"
|
#include "../../EAPBase/include/Module.h"
|
||||||
|
|
||||||
#include <WinStd/Hex.h>
|
#include <stdex/hex>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <EapHostError.h> // include after Windows.h
|
#include <EapHostError.h> // include after Windows.h
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "PCH.h"
|
#include "PCH.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using namespace stdex;
|
||||||
using namespace winstd;
|
using namespace winstd;
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "../../EAPBase/include/Module.h"
|
#include "../../EAPBase/include/Module.h"
|
||||||
|
|
||||||
#include <WinStd/Hex.h>
|
#include <stdex/hex>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <EapHostError.h> // include after Windows.h
|
#include <EapHostError.h> // include after Windows.h
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#pragma comment(lib, "Secur32.lib")
|
#pragma comment(lib, "Secur32.lib")
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using namespace stdex;
|
||||||
using namespace winstd;
|
using namespace winstd;
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "PCH.h"
|
#include "PCH.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using namespace stdex;
|
||||||
using namespace winstd;
|
using namespace winstd;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 880fd34e16d7f6624b7aab64b29a958c6a7ab388
|
Subproject commit cd025b449a31cebde7f8b2ac85330f127f7e383d
|
@ -1 +1 @@
|
|||||||
Subproject commit 4521ea8f00379099888884bc8aa3c7a3894d6b9f
|
Subproject commit f76ece6ca5c6f91276c2845ec7c677fc9773d452
|
Loading…
x
Reference in New Issue
Block a user