1193323Sed/* crypto/sha/sha1dgst.c */
2193323Sed/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3193323Sed * All rights reserved.
4193323Sed *
5193323Sed * This package is an SSL implementation written
6193323Sed * by Eric Young (eay@cryptsoft.com).
7193323Sed * The implementation was written so as to conform with Netscapes SSL.
8193323Sed *
9193323Sed * This library is free for commercial and non-commercial use as long as
10193323Sed * the following conditions are aheared to.  The following conditions
11193323Sed * apply to all code found in this distribution, be it the RC4, RSA,
12193323Sed * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13193323Sed * included with this distribution is covered by the same copyright terms
14193323Sed * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15193323Sed *
16193323Sed * Copyright remains Eric Young's, and as such any Copyright notices in
17193323Sed * the code are not to be removed.
18193323Sed * If this package is used in a product, Eric Young should be given attribution
19224145Sdim * as the author of the parts of the library used.
20224145Sdim * This can be in the form of a textual message at program startup or
21224145Sdim * in documentation (online or textual) provided with the package.
22193323Sed *
23193323Sed * Redistribution and use in source and binary forms, with or without
24193323Sed * modification, are permitted provided that the following conditions
25193323Sed * are met:
26193323Sed * 1. Redistributions of source code must retain the copyright
27193323Sed *    notice, this list of conditions and the following disclaimer.
28193323Sed * 2. Redistributions in binary form must reproduce the above copyright
29193323Sed *    notice, this list of conditions and the following disclaimer in the
30193323Sed *    documentation and/or other materials provided with the distribution.
31193323Sed * 3. All advertising materials mentioning features or use of this software
32193323Sed *    must display the following acknowledgement:
33193323Sed *    "This product includes cryptographic software written by
34193323Sed *     Eric Young (eay@cryptsoft.com)"
35193323Sed *    The word 'cryptographic' can be left out if the rouines from the library
36193323Sed *    being used are not cryptographic related :-).
37193323Sed * 4. If you include any Windows specific code (or a derivative thereof) from
38193323Sed *    the apps directory (application code) you must include an acknowledgement:
39193323Sed *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40193323Sed *
41193323Sed * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42193323Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43193323Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44193323Sed * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45193323Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46193323Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47193323Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48193323Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49193323Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50193323Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51193323Sed * SUCH DAMAGE.
52193323Sed *
53193323Sed * The licence and distribution terms for any publically available version or
54193323Sed * derivative of this code cannot be changed.  i.e. this code cannot simply be
55193323Sed * copied and put under another distribution licence
56193323Sed * [including the GNU Public Licence.]
57193323Sed */
58193323Sed
59193323Sed#include <openssl/opensslconf.h>
60223017Sdim#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
61223017Sdim
62223017Sdim#undef  SHA_0
63224145Sdim#define SHA_1
64224145Sdim
65224145Sdim#include <openssl/opensslv.h>
66224145Sdim
67193323Sedconst char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT;
68193323Sed
69193323Sed/* The implementation is in ../md32_common.h */
70198090Srdivacky
71198090Srdivacky#include "sha_locl.h"
72198090Srdivacky
73198090Srdivacky#endif
74198090Srdivacky
75198090Srdivacky