OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_HTTP_DES_H_ |
| 6 #define NET_HTTP_DES_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 //----------------------------------------------------------------------------- |
| 13 // DES support code for NTLM authentication. |
| 14 // |
| 15 // TODO(wtc): Turn this into a C++ API and move it to the base module. |
| 16 |
| 17 // Build a 64-bit DES key from a 56-bit raw key. |
| 18 void DESMakeKey(const uint8* raw, uint8* key); |
| 19 |
| 20 // Run the DES encryption algorithm in ECB mode on one block (8 bytes) of |
| 21 // data. |key| is a DES key (8 bytes), |src| is the input plaintext (8 |
| 22 // bytes), and |hash| is an 8-byte buffer receiving the output ciphertext. |
| 23 void DESEncrypt(const uint8* key, const uint8* src, uint8* hash); |
| 24 |
| 25 } // namespace net |
| 26 |
| 27 #endif // NET_HTTP_DES_H_ |
OLD | NEW |