| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/http/des.h" | 5 #include "net/ntlm/des.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "crypto/openssl_util.h" | 8 #include "crypto/openssl_util.h" |
| 9 #include "third_party/boringssl/src/include/openssl/des.h" | 9 #include "third_party/boringssl/src/include/openssl/des.h" |
| 10 | 10 |
| 11 // The iOS version of DESEncrypt is our own code. | 11 // The iOS version of DESEncrypt is our own code. |
| 12 // DESSetKeyParity and DESMakeKey are based on | 12 // DESSetKeyParity and DESMakeKey are based on |
| 13 // mozilla/security/manager/ssl/src/nsNTLMAuthModule.cpp, CVS rev. 1.14. | 13 // mozilla/security/manager/ssl/src/nsNTLMAuthModule.cpp, CVS rev. 1.14. |
| 14 /* clang-format off */ |
| 14 | 15 |
| 15 /* ***** BEGIN LICENSE BLOCK ***** | 16 /* ***** BEGIN LICENSE BLOCK ***** |
| 16 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 17 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 17 * | 18 * |
| 18 * The contents of this file are subject to the Mozilla Public License Version | 19 * The contents of this file are subject to the Mozilla Public License Version |
| 19 * 1.1 (the "License"); you may not use this file except in compliance with | 20 * 1.1 (the "License"); you may not use this file except in compliance with |
| 20 * the License. You may obtain a copy of the License at | 21 * the License. You may obtain a copy of the License at |
| 21 * http://www.mozilla.org/MPL/ | 22 * http://www.mozilla.org/MPL/ |
| 22 * | 23 * |
| 23 * Software distributed under the License is distributed on an "AS IS" basis, | 24 * Software distributed under the License is distributed on an "AS IS" basis, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 79 |
| 79 DES_key_schedule ks; | 80 DES_key_schedule ks; |
| 80 DES_set_key( | 81 DES_set_key( |
| 81 reinterpret_cast<const DES_cblock*>(key), &ks); | 82 reinterpret_cast<const DES_cblock*>(key), &ks); |
| 82 | 83 |
| 83 DES_ecb_encrypt(reinterpret_cast<const DES_cblock*>(src), | 84 DES_ecb_encrypt(reinterpret_cast<const DES_cblock*>(src), |
| 84 reinterpret_cast<DES_cblock*>(hash), &ks, DES_ENCRYPT); | 85 reinterpret_cast<DES_cblock*>(hash), &ks, DES_ENCRYPT); |
| 85 } | 86 } |
| 86 | 87 |
| 87 } // namespace net | 88 } // namespace net |
| OLD | NEW |