ObjFW  Diff

Differences From Artifact [1ea07b34f0]:

To Artifact [9c331f3be4]:

  • File src/OFHMAC.m — part of check-in [19f7dc67af] at 2016-07-24 12:14:41 on branch trunk — -[OFCryptoHash digest]: uint8_t -> unsigned char

    While in practice they are usually the same, the C standard says that
    only char does not have any alignment requirements. As (u)int*_t is
    defined to be an integer type of the specified size, it does not mean
    (u)int8_t needs to be char. (user: js, size: 2985) [annotate] [blame] [check-ins using]


104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
		@throw [OFHashAlreadyCalculatedException
		    exceptionWithObject: self];

	[_innerHash updateWithBuffer: buffer
			      length: length];
}

- (const uint8_t*)digest
{
	if (_calculated)
		return [_outerHash digest];

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







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
		@throw [OFHashAlreadyCalculatedException
		    exceptionWithObject: self];

	[_innerHash updateWithBuffer: buffer
			      length: length];
}

- (const unsigned char*)digest
{
	if (_calculated)
		return [_outerHash digest];

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