diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 01:29:24 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 01:29:24 +0000 |
commit | 3f918787e1073e17439e55ed34f23ffdc31f891f (patch) | |
tree | 3e591f7dc3c54e8859815486057725366532ca22 /net/http/des.h | |
parent | 0a5f0a187c73e47417511ea2ed988c5b3876f563 (diff) | |
download | chromium_src-3f918787e1073e17439e55ed34f23ffdc31f891f.zip chromium_src-3f918787e1073e17439e55ed34f23ffdc31f891f.tar.gz chromium_src-3f918787e1073e17439e55ed34f23ffdc31f891f.tar.bz2 |
Implement the NTLM authentication scheme by porting
Mozilla's implementation.
R=darin,eroman
BUG=6567,6824
Review URL: http://codereview.chromium.org/28144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/des.h')
-rw-r--r-- | net/http/des.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net/http/des.h b/net/http/des.h new file mode 100644 index 0000000..7b1469b --- /dev/null +++ b/net/http/des.h @@ -0,0 +1,27 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_HTTP_DES_H_ +#define NET_HTTP_DES_H_ + +#include "base/basictypes.h" + +namespace net { + +//----------------------------------------------------------------------------- +// DES support code for NTLM authentication. +// +// TODO(wtc): Turn this into a C++ API and move it to the base module. + +// Build a 64-bit DES key from a 56-bit raw key. +void DESMakeKey(const uint8* raw, uint8* key); + +// Run the DES encryption algorithm in ECB mode on one block (8 bytes) of +// data. |key| is a DES key (8 bytes), |src| is the input plaintext (8 +// bytes), and |hash| is an 8-byte buffer receiving the output ciphertext. +void DESEncrypt(const uint8* key, const uint8* src, uint8* hash); + +} // namespace net + +#endif // NET_HTTP_DES_H_ |