ObjFW  Diff

Differences From Artifact [4951f2110c]:

To Artifact [5de5b91012]:


8
9
10
11
12
13
14



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
















 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import <stdint.h>

#import "OFObject.h"




@interface OFMD5Hash: OFObject
{
	uint32_t buf[4];
	uint32_t bits[2];
	uint8_t	 in[64];

	BOOL	 calculated;
}

- init;
- (void)updateWithBuffer: (const uint8_t*)buf
		  ofSize: (size_t)size;
- (uint8_t*)digest;
@end























>
>
>











|
|


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
8
9
10
11
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
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import <stdint.h>

#import "OFObject.h"

#define MD5_DIGEST_SIZE	 16
#define SHA1_DIGEST_SIZE 20

@interface OFMD5Hash: OFObject
{
	uint32_t buf[4];
	uint32_t bits[2];
	uint8_t	 in[64];

	BOOL	 calculated;
}

- init;
- updateWithBuffer: (const uint8_t*)buf
	    ofSize: (size_t)size;
- (uint8_t*)digest;
@end

@interface OFSHA1Hash: OFObject
{
	uint32_t    state[5];
	uint64_t    count;
	uint8_t	    buffer[64];
	uint8_t	    digest[SHA1_DIGEST_SIZE];

	BOOL	 calculated;
}

- init;
- updateWithBuffer: (const uint8_t*)buf
	    ofSize: (size_t)size;
- (uint8_t*)digest;
@end