27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#import "OFSHA256Hash.h"
#import "OFSHA384Hash.h"
#import "OFSHA512Hash.h"
int _OFData_CryptoHashing_reference;
@implementation OFData (CryptoHashing)
- (OFString *)of_cryptoHashWithClass: (Class <OFCryptoHash>)class
{
void *pool = objc_autoreleasePoolPush();
id <OFCryptoHash> hash =
[class cryptoHashWithAllowsSwappableMemory: true];
size_t digestSize = [class digestSize];
const unsigned char *digest;
char cString[digestSize * 2];
|
|
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#import "OFSHA256Hash.h"
#import "OFSHA384Hash.h"
#import "OFSHA512Hash.h"
int _OFData_CryptoHashing_reference;
@implementation OFData (CryptoHashing)
- (OFString *)of_cryptoHashWithClass: (Class <OFCryptoHash>)class OF_DIRECT
{
void *pool = objc_autoreleasePoolPush();
id <OFCryptoHash> hash =
[class cryptoHashWithAllowsSwappableMemory: true];
size_t digestSize = [class digestSize];
const unsigned char *digest;
char cString[digestSize * 2];
|