sha.h

00001 /* 
00002  * The contents of this file are subject to the Mozilla Public
00003  * License Version 1.1 (the "License"); you may not use this file
00004  * except in compliance with the License. You may obtain a copy of
00005  * the License at http://www.mozilla.org/MPL/
00006  * 
00007  * Software distributed under the License is distributed on an "AS
00008  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
00009  * implied. See the License for the specific language governing
00010  * rights and limitations under the License.
00011  * 
00012  * The Original Code is SHA 180-1 Reference Implementation (Compact version)
00013  * 
00014  * The Initial Developer of the Original Code is Paul Kocher of
00015  * Cryptography Research.  Portions created by Paul Kocher are 
00016  * Copyright (C) 1995-9 by Cryptography Research, Inc.  All
00017  * Rights Reserved.
00018  * 
00019  * Contributor(s):
00020  *
00021  */
00022 #ifndef _GAIM_SHA_H_
00023 #define _GAIM_SHA_H_
00024 
00025 #include <glib.h>
00026 
00027 typedef struct {
00028     guint32 H[5];
00029     guint32 W[80];
00030     int lenW;
00031     guint32 sizeHi;
00032     guint32 sizeLo;
00033 } SHA_CTX;
00034 
00035 int strprintsha(char *dest, int *hashval);
00036 void shaInit(SHA_CTX *ctx);
00037 void shaUpdate(SHA_CTX *ctx, unsigned char *dataIn, int len);
00038 void shaFinal(SHA_CTX *ctx, unsigned char hashout[20]);
00039 void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]);
00040 
00041 #endif /* _GAIM_SHA_H_ */

Generated on Sun Feb 18 08:38:28 2007 for gaim by  doxygen 1.5.1