ObjFW  Diff

Differences From Artifact [280841ab34]:

To Artifact [223f1ca854]:


126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
}

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

- init
{
	self = [super init];

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







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
}

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

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

	@try {
		if ([self class] == [OFSHA224Or256Hash class]) {
			[self doesNotRecognizeSelector: _cmd];
			abort();
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
- (void)dealloc
{
	[self reset];

	[super dealloc];
}

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

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







|







152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
- (void)dealloc
{
	[self reset];

	[super dealloc];
}

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

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