| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/ntlm/ntlm.h" | 5 #include "net/ntlm/ntlm.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/md5.h" | 10 #include "base/md5.h" |
| 11 #include "base/strings/utf_string_conversions.h" |
| 11 #include "net/ntlm/des.h" | 12 #include "net/ntlm/des.h" |
| 12 #include "net/ntlm/md4.h" | 13 #include "net/ntlm/md4.h" |
| 14 #include "net/ntlm/ntlm_buffer_reader.h" |
| 13 #include "net/ntlm/ntlm_buffer_writer.h" | 15 #include "net/ntlm/ntlm_buffer_writer.h" |
| 14 | 16 |
| 15 namespace net { | 17 namespace net { |
| 16 namespace ntlm { | 18 namespace ntlm { |
| 17 | 19 |
| 18 void GenerateNtlmHashV1(const base::string16& password, uint8_t* hash) { | 20 void GenerateNtlmHashV1(const base::string16& password, uint8_t* hash) { |
| 19 size_t length = password.length() * 2; | 21 size_t length = password.length() * 2; |
| 20 // hash param must have at least 16 bytes of space. | 22 // hash param must have at least 16 bytes of space. |
| 21 NtlmBufferWriter writer(length); | 23 NtlmBufferWriter writer(length); |
| 22 | 24 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 const uint8_t* client_challenge, | 119 const uint8_t* client_challenge, |
| 118 uint8_t* lm_response, | 120 uint8_t* lm_response, |
| 119 uint8_t* ntlm_response) { | 121 uint8_t* ntlm_response) { |
| 120 GenerateLMResponseV1WithSS(client_challenge, lm_response); | 122 GenerateLMResponseV1WithSS(client_challenge, lm_response); |
| 121 GenerateNtlmResponseV1WithSS(password, server_challenge, client_challenge, | 123 GenerateNtlmResponseV1WithSS(password, server_challenge, client_challenge, |
| 122 ntlm_response); | 124 ntlm_response); |
| 123 } | 125 } |
| 124 | 126 |
| 125 } // namespace ntlm | 127 } // namespace ntlm |
| 126 } // namespace net | 128 } // namespace net |
| OLD | NEW |