annotate src/sha.c @ 8496:f07fbdfbe2e0

[gaim-migrate @ 9231] Remove some printfs. Hopefully we'll release Thursday? committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 24 Mar 2004 01:50:32 +0000
parents 0f6673c1ae38
children 26c9b8761707
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6987
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /*
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * The contents of this file are subject to the Mozilla Public
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * License Version 1.1 (the "License"); you may not use this file
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * except in compliance with the License. You may obtain a copy of
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 * the License at http://www.mozilla.org/MPL/
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 *
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * Software distributed under the License is distributed on an "AS
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * implied. See the License for the specific language governing
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * rights and limitations under the License.
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 *
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * The Original Code is SHA 180-1 Reference Implementation (Compact version)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 *
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * The Initial Developer of the Original Code is Paul Kocher of
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * Cryptography Research. Portions created by Paul Kocher are
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * Copyright (C) 1995-9 by Cryptography Research, Inc. All
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * Rights Reserved.
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 *
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * Contributor(s):
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 *
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 #include "sha.h"
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 static void shaHashBlock(SHA_CTX *ctx);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 void shaInit(SHA_CTX *ctx) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 int i;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 ctx->lenW = 0;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 ctx->sizeHi = ctx->sizeLo = 0;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 /* Initialize H with the magic constants (see FIPS180 for constants)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 ctx->H[0] = 0x67452301L;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 ctx->H[1] = 0xefcdab89L;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 ctx->H[2] = 0x98badcfeL;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 ctx->H[3] = 0x10325476L;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 ctx->H[4] = 0xc3d2e1f0L;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 for (i = 0; i < 80; i++)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 ctx->W[i] = 0;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 void shaUpdate(SHA_CTX *ctx, unsigned char *dataIn, int len) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 int i;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 /* Read the data into W and process blocks as they get full
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 for (i = 0; i < len; i++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 ctx->W[ctx->lenW / 4] <<= 8;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 ctx->W[ctx->lenW / 4] |= (unsigned long)dataIn[i];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 if ((++ctx->lenW) % 64 == 0) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 shaHashBlock(ctx);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 ctx->lenW = 0;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 ctx->sizeLo += 8;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 ctx->sizeHi += (ctx->sizeLo < 8);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 void shaFinal(SHA_CTX *ctx, unsigned char hashout[20]) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 unsigned char pad0x80 = 0x80;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 unsigned char pad0x00 = 0x00;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 unsigned char padlen[8];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 int i;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 /* Pad with a binary 1 (e.g. 0x80), then zeroes, then length
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 padlen[0] = (unsigned char)((ctx->sizeHi >> 24) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 padlen[1] = (unsigned char)((ctx->sizeHi >> 16) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 padlen[2] = (unsigned char)((ctx->sizeHi >> 8) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 padlen[3] = (unsigned char)((ctx->sizeHi >> 0) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 padlen[4] = (unsigned char)((ctx->sizeLo >> 24) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 padlen[5] = (unsigned char)((ctx->sizeLo >> 16) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 padlen[6] = (unsigned char)((ctx->sizeLo >> 8) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 padlen[7] = (unsigned char)((ctx->sizeLo >> 0) & 255);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 shaUpdate(ctx, &pad0x80, 1);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 while (ctx->lenW != 56)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 shaUpdate(ctx, &pad0x00, 1);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 shaUpdate(ctx, padlen, 8);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 /* Output hash
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 for (i = 0; i < 20; i++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 hashout[i] = (unsigned char)(ctx->H[i / 4] >> 24);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 ctx->H[i / 4] <<= 8;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 /*
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 * Re-initialize the context (also zeroizes contents)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 */
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 shaInit(ctx);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 SHA_CTX ctx;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 shaInit(&ctx);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 shaUpdate(&ctx, dataIn, len);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 shaFinal(&ctx, hashout);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 #define SHA_ROTL(X,n) ((((X) << (n)) | ((X) >> (32-(n)))) & 0xffffffffL)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 static void shaHashBlock(SHA_CTX *ctx) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 int t;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 unsigned long A,B,C,D,E,TEMP;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 for (t = 16; t <= 79; t++)
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 ctx->W[t] =
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 SHA_ROTL(ctx->W[t-3] ^ ctx->W[t-8] ^ ctx->W[t-14] ^ ctx->W[t-16], 1);
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 A = ctx->H[0];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 B = ctx->H[1];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 C = ctx->H[2];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 D = ctx->H[3];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 E = ctx->H[4];
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 for (t = 0; t <= 19; t++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 TEMP = (SHA_ROTL(A,5) + (((C^D)&B)^D) + E + ctx->W[t] + 0x5a827999L) & 0xffffffffL;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 for (t = 20; t <= 39; t++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 TEMP = (SHA_ROTL(A,5) + (B^C^D) + E + ctx->W[t] + 0x6ed9eba1L) & 0xffffffffL;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 for (t = 40; t <= 59; t++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 TEMP = (SHA_ROTL(A,5) + ((B&C)|(D&(B|C))) + E + ctx->W[t] + 0x8f1bbcdcL) & 0xffffffffL;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 for (t = 60; t <= 79; t++) {
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 TEMP = (SHA_ROTL(A,5) + (B^C^D) + E + ctx->W[t] + 0xca62c1d6L) & 0xffffffffL;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 }
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 ctx->H[0] += A;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 ctx->H[1] += B;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 ctx->H[2] += C;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 ctx->H[3] += D;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 ctx->H[4] += E;
0f6673c1ae38 [gaim-migrate @ 7543]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 }