ObjFW  Diff

Differences From Artifact [6ff07dab9e]:

To Artifact [7ebbc5c21e]:


137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
}

+ (instancetype)cryptoHash
{
	return [[[self alloc] init] autorelease];
}

- init
{
	self = [super init];

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







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
}

+ (instancetype)cryptoHash
{
	return [[[self alloc] init] autorelease];
}

- (instancetype)init
{
	self = [super init];

	@try {
		if ([self class] == [OFSHA384Or512Hash class]) {
			[self doesNotRecognizeSelector: _cmd];
			abort();
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
- (void)dealloc
{
	[self reset];

	[super dealloc];
}

- copy
{
	OFSHA384Or512Hash *copy = [[[self class] alloc] init];

	memcpy(copy->_state, _state, sizeof(_state));
	memcpy(copy->_bits, _bits, sizeof(_bits));
	memcpy(&copy->_buffer, &_buffer, sizeof(_buffer));
	copy->_bufferLength = _bufferLength;







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
- (void)dealloc
{
	[self reset];

	[super dealloc];
}

- (id)copy
{
	OFSHA384Or512Hash *copy = [[[self class] alloc] init];

	memcpy(copy->_state, _state, sizeof(_state));
	memcpy(copy->_bits, _bits, sizeof(_bits));
	memcpy(&copy->_buffer, &_buffer, sizeof(_buffer));
	copy->_bufferLength = _bufferLength;