sha_dgst.c revision bdfb8ad83da0647e9b9a32792598e8ce7ba3ef4d
15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)/* crypto/sha/sha1dgst.c */
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * All rights reserved.
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * This package is an SSL implementation written
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * by Eric Young (eay@cryptsoft.com).
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * The implementation was written so as to conform with Netscapes SSL.
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * This library is free for commercial and non-commercial use as long as
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * the following conditions are aheared to.  The following conditions
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * apply to all code found in this distribution, be it the RC4, RSA,
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * included with this distribution is covered by the same copyright terms
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * except that the holder is Tim Hudson (tjh@cryptsoft.com).
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * Copyright remains Eric Young's, and as such any Copyright notices in
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * the code are not to be removed.
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * If this package is used in a product, Eric Young should be given attribution
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * as the author of the parts of the library used.
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * This can be in the form of a textual message at program startup or
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * in documentation (online or textual) provided with the package.
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * modification, are permitted provided that the following conditions
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * are met:
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 1. Redistributions of source code must retain the copyright
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    notice, this list of conditions and the following disclaimer.
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 2. Redistributions in binary form must reproduce the above copyright
295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    notice, this list of conditions and the following disclaimer in the
305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    documentation and/or other materials provided with the distribution.
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 3. All advertising materials mentioning features or use of this software
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    must display the following acknowledgement:
335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    "This product includes cryptographic software written by
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *     Eric Young (eay@cryptsoft.com)"
355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    The word 'cryptographic' can be left out if the rouines from the library
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    being used are not cryptographic related :-).
375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * 4. If you include any Windows specific code (or a derivative thereof) from
385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    the apps directory (application code) you must include an acknowledgement:
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * SUCH DAMAGE.
525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) *
535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * The licence and distribution terms for any publically available version or
545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * derivative of this code cannot be changed.  i.e. this code cannot simply be
555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * copied and put under another distribution licence
565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) * [including the GNU Public Licence.]
575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) */
585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <openssl/opensslconf.h>
605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#undef  SHA_1
635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define SHA_0
645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <openssl/opensslv.h>
665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)const char SHA_version[]="SHA" OPENSSL_VERSION_PTEXT;
685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)/* The implementation is in ../md32_common.h */
705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "sha_locl.h"
725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif
745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)