ObjFW  Diff

Differences From Artifact [61a4776d3d]:

To Artifact [c9ae48fd28]:


74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88







-
+







	@try {
		if (length > blockSize) {
			id <OFCryptoHash> hash = [_hashClass cryptoHash];

			[hash updateWithBuffer: key
					length: length];

			length = [_hashClass digestSize];
			length = hash.digestSize;
			if OF_UNLIKELY (length > blockSize)
				length = blockSize;

			memcpy(outerKeyPadItems, hash.digest, length);
			memcpy(innerKeyPadItems, hash.digest, length);
		} else {
			memcpy(outerKeyPadItems, key, length);
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
138
139
140
141
142
143
144

145
146
147
148
149
150
151
152







-
+







	if (_outerHash == nil || _innerHash == nil)
		@throw [OFInvalidArgumentException exception];

	if (_calculated)
		return _outerHash.digest;

	[_outerHash updateWithBuffer: _innerHash.digest
			      length: [_hashClass digestSize]];
			      length: _innerHash.digestSize];
	_calculated = true;

	return _outerHash.digest;
}

- (size_t)digestSize
{