Revert of Pepper: Fix reentrancy problem in PepperPluginInstanceImpl. (patchset ...
[chromium-blink-merge.git] / net / http / des.h
bloba1803ba3a39ae00f91c227f776b02fd19488fb67
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
3 // found in the LICENSE file.
5 #ifndef NET_HTTP_DES_H_
6 #define NET_HTTP_DES_H_
8 #include "base/basictypes.h"
9 #include "net/base/net_export.h"
11 namespace net {
13 //-----------------------------------------------------------------------------
14 // DES support code for NTLM authentication.
16 // TODO(wtc): Turn this into a C++ API and move it to the base module.
18 // Build a 64-bit DES key from a 56-bit raw key.
19 NET_EXPORT_PRIVATE void DESMakeKey(const uint8* raw, uint8* key);
21 // Run the DES encryption algorithm in ECB mode on one block (8 bytes) of
22 // data. |key| is a DES key (8 bytes), |src| is the input plaintext (8
23 // bytes), and |hash| is an 8-byte buffer receiving the output ciphertext.
24 NET_EXPORT_PRIVATE void DESEncrypt(const uint8* key, const uint8* src,
25 uint8* hash);
27 } // namespace net
29 #endif // NET_HTTP_DES_H_