src/net/ntlm/ntlm_client_unittest.cc
// Reads bytes from a payload and assigns them to a string. This makes
// no assumptions about the underlying encoding.
Reads bytes from a payload and assigns them to a string. This makes
no assumptions about the underlying encoding.
Reads bytes from a payload and assigns them to a string . This makes no assumptions about the underlying encoding .
bool ReadStringPayload(NtlmBufferReader* reader, std::string* str) {
  SecurityBuffer sec_buf;
  if (!reader->ReadSecurityBuffer(&sec_buf))
    return false;
  if (!reader->ReadBytesFrom(
          sec_buf,
          base::as_writable_bytes(base::make_span(
              base::WriteInto(str, sec_buf.length + 1), sec_buf.length)))) {
    return false;
  }
  return true;
}
bool ReadStringPayload ( NtlmBufferReader * reader , std :: string * str ) { SecurityBuffer sec_buf ; if ( ! reader -> ReadSecurityBuffer ( & sec_buf ) ) return false ; if ( ! reader -> ReadBytesFrom ( sec_buf , base :: as_writable_bytes ( base :: make_span ( base :: WriteInto ( str , sec_buf . length + 1 ) , sec_buf . length ) ) ) ) { return false ; } return true ; }
Reads bytes from a payload and assigns them to a string.
Reads bytes from a payload and assigns them to a string .