Index: net/ntlm/des.cc |
diff --git a/net/http/des.cc b/net/ntlm/des.cc |
similarity index 93% |
rename from net/http/des.cc |
rename to net/ntlm/des.cc |
index 57f67d7c51f81e3fe76c690e499ee8f9aa1cdb04..7f69299952fd09b657550245bacd54760c096599 100644 |
--- a/net/http/des.cc |
+++ b/net/ntlm/des.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "net/http/des.h" |
+#include "net/ntlm/des.h" |
#include "base/logging.h" |
#include "crypto/openssl_util.h" |
@@ -50,9 +50,9 @@ |
// Set odd parity bit (in least significant bit position). |
static uint8_t DESSetKeyParity(uint8_t x) { |
- if ((((x >> 7) ^ (x >> 6) ^ (x >> 5) ^ |
- (x >> 4) ^ (x >> 3) ^ (x >> 2) ^ |
- (x >> 1)) & 0x01) == 0) { |
+ if ((((x >> 7) ^ (x >> 6) ^ (x >> 5) ^ (x >> 4) ^ (x >> 3) ^ (x >> 2) ^ |
+ (x >> 1)) & |
+ 0x01) == 0) { |
x |= 0x01; |
} else { |
x &= 0xfe; |
@@ -77,8 +77,7 @@ void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) { |
crypto::EnsureOpenSSLInit(); |
DES_key_schedule ks; |
- DES_set_key( |
- reinterpret_cast<const DES_cblock*>(key), &ks); |
+ DES_set_key(reinterpret_cast<const DES_cblock*>(key), &ks); |
DES_ecb_encrypt(reinterpret_cast<const DES_cblock*>(src), |
reinterpret_cast<DES_cblock*>(hash), &ks, DES_ENCRYPT); |