ObjFW  Diff

Differences From Artifact [07e1179a49]:

To Artifact [280841ab34]:


18
19
20
21
22
23
24




25
26
27
28
29
30
31
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35







+
+
+
+








#include <stdlib.h>
#include <string.h>

#import "OFSHA224Or256Hash.h"

#import "OFHashAlreadyCalculatedException.h"

@interface OFSHA224Or256Hash ()
- (void)of_resetState;
@end

static const uint32_t table[] = {
	0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
	0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
	0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
	0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
	0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+








	@try {
		if ([self class] == [OFSHA224Or256Hash class]) {
			[self doesNotRecognizeSelector: _cmd];
			abort();
		}

		[self OF_resetState];
		[self of_resetState];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
217
218
219
220
221
222
223
224

225
226
227
228
229
230
231

232
233
234
235
221
222
223
224
225
226
227

228
229
230
231
232
233
234

235
236
237
238
239







-
+






-
+




	_calculated = true;

	return (const uint8_t *)_state;
}

- (void)reset
{
	[self OF_resetState];
	[self of_resetState];
	_bits = 0;
	memset(&_buffer, 0, sizeof(_buffer));
	_bufferLength = 0;
	_calculated = false;
}

- (void)OF_resetState
- (void)of_resetState
{
	OF_UNRECOGNIZED_SELECTOR
}
@end