Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: net/ntlm/des.cc

Issue 2873673002: Add unit tests for NTLMv1 portable implementation (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/ntlm/des.h ('k') | net/ntlm/des_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/ntlm/des.h ('k') | net/ntlm/des_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698