ObjFW  Diff

Differences From Artifact [353a43c133]:

To Artifact [0df0a4dfec]:


144
145
146
147
148
149
150







151
152
153
154
155
156
157
158
159
160
161
162
163
164
	return [[[self alloc] init] autorelease];
}

- init
{
	self = [super init];








	_state[0] = 0x67452301;
	_state[1] = 0xEFCDAB89;
	_state[2] = 0x98BADCFE;
	_state[3] = 0x10325476;
	_state[4] = 0xC3D2E1F0;

	return self;
}

- (void)updateWithBuffer: (const void*)buffer_
		  length: (size_t)length
{
	const uint8_t *buffer = buffer_;








>
>
>
>
>
>
>





<
<







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162


163
164
165
166
167
168
169
	return [[[self alloc] init] autorelease];
}

- init
{
	self = [super init];

	[self OF_resetState];

	return self;
}

- (void)OF_resetState
{
	_state[0] = 0x67452301;
	_state[1] = 0xEFCDAB89;
	_state[2] = 0x98BADCFE;
	_state[3] = 0x10325476;
	_state[4] = 0xC3D2E1F0;


}

- (void)updateWithBuffer: (const void*)buffer_
		  length: (size_t)length
{
	const uint8_t *buffer = buffer_;

211
212
213
214
215
216
217









218
	return (const uint8_t*)_state;
}

- (bool)isCalculated
{
	return _calculated;
}









@end







>
>
>
>
>
>
>
>
>

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
	return (const uint8_t*)_state;
}

- (bool)isCalculated
{
	return _calculated;
}

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