/opensource.apple.com/source/OpenSSL096/OpenSSL096-15/openssl/crypto/md2/md2.h
# · C Header · 116 lines · 55 code · 7 blank · 54 comment · 0 complexity · a96089ddc173e6c3d824c605fbad40a7 MD5 · raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>md2.h</title>
- <style type="text/css">
- .enscript-comment { font-style: italic; color: rgb(178,34,34); }
- .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
- .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
- .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
- .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
- .enscript-string { font-weight: bold; color: rgb(188,143,143); }
- .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
- .enscript-type { font-weight: bold; color: rgb(34,139,34); }
- .enscript-highlight { text-decoration: underline; color: 0; }
- </style>
- </head>
- <body id="top">
- <h1 style="margin:8px;" id="f1">md2.h <span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
- <hr/>
- <div></div>
- <pre>
- <span class="enscript-comment">/* crypto/md/md2.h */</span>
- <span class="enscript-comment">/* Copyright (C) 1995-1997 Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (<a href="mailto:tjh@cryptsoft.com">tjh@cryptsoft.com</a>).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (<a href="mailto:tjh@cryptsoft.com">tjh@cryptsoft.com</a>)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */</span>
- #<span class="enscript-reference">ifndef</span> <span class="enscript-variable-name">HEADER_MD2_H</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">HEADER_MD2_H</span>
- #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">NO_MD2</span>
- #<span class="enscript-reference">error</span> <span class="enscript-variable-name">MD2</span> <span class="enscript-variable-name">is</span> <span class="enscript-variable-name">disabled</span>.
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">MD2_DIGEST_LENGTH</span> 16
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">MD2_BLOCK</span> 16
- #<span class="enscript-reference">include</span> <span class="enscript-string"><openssl/opensslconf.h></span> <span class="enscript-comment">/* MD2_INT */</span>
- #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">__cplusplus</span>
- <span class="enscript-type">extern</span> <span class="enscript-string">"C"</span> {
- #<span class="enscript-reference">endif</span>
- <span class="enscript-type">typedef</span> <span class="enscript-type">struct</span> MD2state_st
- {
- <span class="enscript-type">int</span> num;
- <span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> data[MD2_BLOCK];
- MD2_INT cksm[MD2_BLOCK];
- MD2_INT state[MD2_BLOCK];
- } MD2_CTX;
- <span class="enscript-type">const</span> <span class="enscript-type">char</span> *<span class="enscript-function-name">MD2_options</span>(<span class="enscript-type">void</span>);
- <span class="enscript-type">void</span> <span class="enscript-function-name">MD2_Init</span>(MD2_CTX *c);
- <span class="enscript-type">void</span> <span class="enscript-function-name">MD2_Update</span>(MD2_CTX *c, <span class="enscript-type">const</span> <span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> *data, <span class="enscript-type">unsigned</span> <span class="enscript-type">long</span> len);
- <span class="enscript-type">void</span> <span class="enscript-function-name">MD2_Final</span>(<span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> *md, MD2_CTX *c);
- <span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> *<span class="enscript-function-name">MD2</span>(<span class="enscript-type">const</span> <span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> *d, <span class="enscript-type">unsigned</span> <span class="enscript-type">long</span> n,<span class="enscript-type">unsigned</span> <span class="enscript-type">char</span> *md);
- #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">__cplusplus</span>
- }
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">endif</span>
- </pre>
- <hr />
- </body></html>