From 768e0a5a3686cbd9d6740c5b949c6e6a6824ac9b Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 20 Jun 2016 16:24:58 +0200 Subject: [PATCH] Previously unused templates fixed --- lib/EAPBase/include/Module.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/EAPBase/include/Module.h b/lib/EAPBase/include/Module.h index 2545e53..e782c3a 100644 --- a/lib/EAPBase/include/Module.h +++ b/lib/EAPBase/include/Module.h @@ -142,7 +142,7 @@ namespace eap template bool encrypt(_In_ HCRYPTPROV hProv, _In_ const std::basic_string<_Elem, _Traits, _Ax> &val, _Out_ std::vector &enc, _Out_ EAP_ERROR **ppEapError, _Out_opt_ HCRYPTHASH hHash = NULL) const { - return encrypt(hProv, val.c_str(), val.length*sizeof(_Elem), enc, ppEapError, hHash); + return encrypt(hProv, val.c_str(), val.length()*sizeof(_Elem), enc, ppEapError, hHash); } @@ -295,7 +295,7 @@ namespace eap std::vector<_Elem, sanitizing_allocator<_Elem> > buf; if (!decrypt(hProv, data, size, buf, ppEapError, hHash)) return false; - dec.assign((const _Elem*)buf.begin(), (const _Elem*)buf.end()); + dec.assign(buf.data(), buf.size()); return true; }