• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This is mozilla/security/manager/ssl/src/md4.h, CVS rev. 1.1, with trivial
2 // changes to port it to our source tree.
3 //
4 // WARNING: MD4 is cryptographically weak.  Do not use MD4 except in NTLM
5 // authentication.
6 
7 /* vim:set ts=2 sw=2 et cindent: */
8 /* ***** BEGIN LICENSE BLOCK *****
9  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
10  *
11  * The contents of this file are subject to the Mozilla Public License Version
12  * 1.1 (the "License"); you may not use this file except in compliance with
13  * the License. You may obtain a copy of the License at
14  * http://www.mozilla.org/MPL/
15  *
16  * Software distributed under the License is distributed on an "AS IS" basis,
17  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
18  * for the specific language governing rights and limitations under the
19  * License.
20  *
21  * The Original Code is Mozilla.
22  *
23  * The Initial Developer of the Original Code is IBM Corporation.
24  * Portions created by IBM Corporation are Copyright (C) 2003
25  * IBM Corporation. All Rights Reserved.
26  *
27  * Contributor(s):
28  *   Darin Fisher <darin@meer.net>
29  *
30  * Alternatively, the contents of this file may be used under the terms of
31  * either the GNU General Public License Version 2 or later (the "GPL"), or
32  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
33  * in which case the provisions of the GPL or the LGPL are applicable instead
34  * of those above. If you wish to allow use of your version of this file only
35  * under the terms of either the GPL or the LGPL, and not to allow others to
36  * use your version of this file under the terms of the MPL, indicate your
37  * decision by deleting the provisions above and replace them with the notice
38  * and other provisions required by the GPL or the LGPL. If you do not delete
39  * the provisions above, a recipient may use your version of this file under
40  * the terms of any one of the MPL, the GPL or the LGPL.
41  *
42  * ***** END LICENSE BLOCK ***** */
43 
44 #ifndef NET_HTTP_MD4_H_
45 #define NET_HTTP_MD4_H_
46 
47 #include "base/basictypes.h"
48 
49 namespace net {
50 namespace weak_crypto {
51 
52 /**
53  * MD4Sum - computes the MD4 sum over the input buffer per RFC 1320
54  *
55  * @param input
56  *        buffer containing input data
57  * @param inputLen
58  *        length of input buffer (number of bytes)
59  * @param result
60  *        16-byte buffer that will contain the MD4 sum upon return
61  *
62  * NOTE: MD4 is superceded by MD5.  do not use MD4 unless required by the
63  * protocol you are implementing (e.g., NTLM requires MD4).
64  *
65  * NOTE: this interface is designed for relatively small buffers.  A streaming
66  * interface would make more sense if that were a requirement.  Currently, this
67  * is good enough for the applications we care about.
68  */
69 void MD4Sum(const uint8 *input, uint32 inputLen, uint8 *result);
70 
71 }  // namespace net::weak_crypto
72 }  // namespace net
73 
74 #endif  // NET_HTTP_MD4_H_
75