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 #ifndef NET_HTTP_DES_H_ | 5 #ifndef NET_HTTP_DES_H_ |
6 #define NET_HTTP_DES_H_ | 6 #define NET_HTTP_DES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "net/base/net_api.h" | 10 #include "net/base/net_export.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 //----------------------------------------------------------------------------- | 14 //----------------------------------------------------------------------------- |
15 // DES support code for NTLM authentication. | 15 // DES support code for NTLM authentication. |
16 // | 16 // |
17 // TODO(wtc): Turn this into a C++ API and move it to the base module. | 17 // TODO(wtc): Turn this into a C++ API and move it to the base module. |
18 | 18 |
19 // Build a 64-bit DES key from a 56-bit raw key. | 19 // Build a 64-bit DES key from a 56-bit raw key. |
20 NET_TEST void DESMakeKey(const uint8* raw, uint8* key); | 20 NET_EXPORT_PRIVATE void DESMakeKey(const uint8* raw, uint8* key); |
21 | 21 |
22 // Run the DES encryption algorithm in ECB mode on one block (8 bytes) of | 22 // Run the DES encryption algorithm in ECB mode on one block (8 bytes) of |
23 // data. |key| is a DES key (8 bytes), |src| is the input plaintext (8 | 23 // data. |key| is a DES key (8 bytes), |src| is the input plaintext (8 |
24 // bytes), and |hash| is an 8-byte buffer receiving the output ciphertext. | 24 // bytes), and |hash| is an 8-byte buffer receiving the output ciphertext. |
25 NET_TEST void DESEncrypt(const uint8* key, const uint8* src, uint8* hash); | 25 NET_EXPORT_PRIVATE void DESEncrypt(const uint8* key, const uint8* src, |
| 26 uint8* hash); |
26 | 27 |
27 } // namespace net | 28 } // namespace net |
28 | 29 |
29 #endif // NET_HTTP_DES_H_ | 30 #endif // NET_HTTP_DES_H_ |
OLD | NEW |