diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-28 23:20:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-28 23:20:14 +0000 |
commit | 3ae3e700704f3cd9bc44451a41dd59d0c2871784 (patch) | |
tree | 44b8bb8ff63b76f95984bbd286b40cfa88381c55 /epan/sha1.h | |
parent | 425462d5f6e65f2754f18be01e2c9a944fee4e7a (diff) | |
download | wireshark-3ae3e700704f3cd9bc44451a41dd59d0c2871784.tar.gz wireshark-3ae3e700704f3cd9bc44451a41dd59d0c2871784.tar.bz2 wireshark-3ae3e700704f3cd9bc44451a41dd59d0c2871784.zip |
Move the SHA-1 code and header into epan, and give them RCS IDs.
svn path=/trunk/; revision=12125
Diffstat (limited to 'epan/sha1.h')
-rw-r--r-- | epan/sha1.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/epan/sha1.h b/epan/sha1.h new file mode 100644 index 0000000000..4b7e7d4c8b --- /dev/null +++ b/epan/sha1.h @@ -0,0 +1,43 @@ +/* + * FIPS-180-1 compliant SHA-1 implementation + * + * $Id$ + * + * Copyright (C) 2001-2003 Christophe Devine + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Changed to use guint instead of uint 2004 by Anders Broman + * Original code found at http://www.cr0.net:8040/code/crypto/sha1/ + * References: http://www.ietf.org/rfc/rfc3174.txt?number=3174 + */ + +#ifndef _SHA1_H +#define _SHA1_H + + +typedef struct +{ + guint32 total[2]; + guint32 state[5]; + guint8 buffer[64]; +} +sha1_context; + +void sha1_starts( sha1_context *ctx ); +void sha1_update( sha1_context *ctx, guint8 *input, guint32 length ); +void sha1_finish( sha1_context *ctx, guint8 digest[20] ); + +#endif /* sha1.h */ |