Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzWebhost::AuthBasic | (const char*,const char*,) |
Declared in file: hzHttpClient.h
Defined in file : hzHttpClient.cpp
Function Logic:
Function body:
hzEcode hzWebhost::AuthBasic (const char* username, const char* password) { _hzfunc("hzWebhost::AuthBasic") ; hzChain Enc ; hzChain Raw ; if (!username || !username[0]|| !password || !password[0]) { threadLog("Must supply both a username and password\n") ; return E_ARGUMENT ; } Raw << username ; Raw.AddByte(CHAR_COLON) ; Raw << password ; Base64Encode(Enc, Raw) ; HC.m_AuthBasic = m_AuthBasic = Enc ; return E_OK ; }