mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Use std::string_view throughout util strencodings/string
This commit is contained in:
parent
8ffbd1412d
commit
e7d2fbda63
9 changed files with 69 additions and 56 deletions
|
|
@ -131,7 +131,7 @@ static bool RPCAuthorized(const std::string& strAuth, std::string& strAuthUserna
|
|||
return false;
|
||||
if (strAuth.substr(0, 6) != "Basic ")
|
||||
return false;
|
||||
std::string strUserPass64 = TrimString(strAuth.substr(6));
|
||||
std::string_view strUserPass64 = TrimStringView(std::string_view{strAuth}.substr(6));
|
||||
auto userpass_data = DecodeBase64(strUserPass64);
|
||||
std::string strUserPass;
|
||||
if (!userpass_data) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue