annotate src/sha.h @ 10554:0ad82505bde8

[gaim-migrate @ 11931] Buddies can be in more than one group (at least on some protocols), so we should update their status/idle/warning/etc. in all groups. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 29 Jan 2005 18:03:48 +0000
parents db62420a53a2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8907
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
1 /*
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
2 * The contents of this file are subject to the Mozilla Public
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
3 * License Version 1.1 (the "License"); you may not use this file
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
4 * except in compliance with the License. You may obtain a copy of
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
5 * the License at http://www.mozilla.org/MPL/
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
6 *
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
7 * Software distributed under the License is distributed on an "AS
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
9 * implied. See the License for the specific language governing
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
10 * rights and limitations under the License.
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
11 *
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
12 * The Original Code is SHA 180-1 Reference Implementation (Compact version)
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
13 *
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
14 * The Initial Developer of the Original Code is Paul Kocher of
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
15 * Cryptography Research. Portions created by Paul Kocher are
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
16 * Copyright (C) 1995-9 by Cryptography Research, Inc. All
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
17 * Rights Reserved.
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
18 *
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
19 * Contributor(s):
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
20 *
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
21 */
9713
db62420a53a2 [gaim-migrate @ 10574]
Mark Doliner <mark@kingant.net>
parents: 8907
diff changeset
22 #ifndef _GAIM_SHA_H_
db62420a53a2 [gaim-migrate @ 10574]
Mark Doliner <mark@kingant.net>
parents: 8907
diff changeset
23 #define _GAIM_SHA_H_
8907
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
24
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
25 #include <glib.h>
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
26
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
27 typedef struct {
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
28 guint32 H[5];
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
29 guint32 W[80];
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
30 int lenW;
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
31 guint32 sizeHi;
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
32 guint32 sizeLo;
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
33 } SHA_CTX;
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
34
6987
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 int strprintsha(char *dest, int *hashval);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 void shaInit(SHA_CTX *ctx);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 void shaUpdate(SHA_CTX *ctx, unsigned char *dataIn, int len);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 void shaFinal(SHA_CTX *ctx, unsigned char hashout[20]);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]);
8907
00138e366ef8 [gaim-migrate @ 9677]
Luke Schierer <lschiere@pidgin.im>
parents: 6987
diff changeset
40
9713
db62420a53a2 [gaim-migrate @ 10574]
Mark Doliner <mark@kingant.net>
parents: 8907
diff changeset
41 #endif /* _GAIM_SHA_H_ */