ObjFW  Diff

Differences From Artifact [a3d9e07296]:

To Artifact [e20cbc12c6]:


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

33
34
35
36
37
38

39
40
41
42
43
44
45

46
47
48
49
50
51

52
53
54
55
56
57
58
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFHash.h"

#import "OFNotImplementedException.h"

@implementation OFHash
+ (instancetype)hash
{
	return [[[self alloc] init] autorelease];
}

+ (size_t)digestSize
{
	@throw [OFNotImplementedException exceptionWithClass: self
						    selector: _cmd];

}

+ (size_t)blockSize
{
	@throw [OFNotImplementedException exceptionWithClass: self
						    selector: _cmd];

}

- (void)updateWithBuffer: (const void*)buffer
		  length: (size_t)length
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];

}

- (uint8_t*)digest
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];

}

- (BOOL)isCalculated
{
	return calculated;
}
@end







|

|









<
|
>




<
|
>





<
|
>




<
|
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

31
32
33
34
35
36

37
38
39
40
41
42
43

44
45
46
47
48
49

50
51
52
53
54
55
56
57
58
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <stdlib.h>

#import "OFHash.h"

@implementation OFHash
+ (instancetype)hash
{
	return [[[self alloc] init] autorelease];
}

+ (size_t)digestSize
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

+ (size_t)blockSize
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (void)updateWithBuffer: (const void*)buffer
		  length: (size_t)length
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (uint8_t*)digest
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (BOOL)isCalculated
{
	return calculated;
}
@end