sha1.c revision 499b34cea04a46823d003d4c0520c8b03e8513cb
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * Copyright (C) 2000, 2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * copyright notice and this permission notice appear in all copies.
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews/* $Id: sha1.c,v 1.10 2001/01/09 21:56:28 bwelling Exp $ */
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews/* $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
5ae2eac4c16bdbbef032544bd9fc86f47e7bdc2cMark Andrews/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
#include "config.h"
#if !defined(WORDS_BIGENDIAN)
# define blk0(i) \
#define blk(i) \
#define R0(v,w,x,y,z,i) \
#define R1(v,w,x,y,z,i) \
#define R2(v,w,x,y,z,i) \
#define R3(v,w,x,y,z,i) \
#define R4(v,w,x,y,z,i) \
} CHAR64LONG16;
isc_uint32_t a, b, c, d, e;
a = state[0];
/* Add the working vars back into context.state[] */
state[0] += a;
unsigned int len)
static const unsigned char final_0 = 0;
finalcount[i] = (unsigned char)
if (digest) {
digest[i] = (unsigned char)