ObjFW  Diff

Differences From Artifact [d7c7a2d4d1]:

To Artifact [2bc09b0ad0]:


29
30
31
32
33
34
35
36


37
38
39
40
41
42
43
29
30
31
32
33
34
35

36
37
38
39
40
41
42
43
44







-
+
+








int _OFString_CryptoHashing_reference;

@implementation OFString (CryptoHashing)
- (OFString *)of_cryptoHashWithClass: (Class <OFCryptoHash>)class
{
	void *pool = objc_autoreleasePoolPush();
	id <OFCryptoHash> hash = [class cryptoHash];
	id <OFCryptoHash> hash = [class
	    cryptoHashWithAllowsSwappableMemory: true];
	size_t digestSize = [class digestSize];
	const unsigned char *digest;
	char cString[digestSize * 2];

	[hash updateWithBuffer: self.UTF8String
			length: self.UTF8StringLength];
	digest = hash.digest;