Differences From Artifact [d7c7a2d4d1]:
- File src/OFString+CryptoHashing.m — part of check-in [bceb7ed4c9] at 2019-03-08 00:35:48 on branch trunk — Use dot syntax (user: js, size: 2330) [annotate] [blame] [check-ins using]
To Artifact [2bc09b0ad0]:
- File
src/OFString+CryptoHashing.m
— part of check-in
[e629dc83a9]
at
2019-12-27 00:41:54
on branch trunk
— OFSecureData: Add allowsSwappableMemory property
With this property, it's possible to specify whether the memory should
be protected from swapping or not. This makes it easier for e.g. the
crypto hash classes: They can now just always use OFSecureData without
wasting unswappable memory if it's not needed. (user: js, size: 2366) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
29 30 31 32 33 34 35 |
int _OFString_CryptoHashing_reference;
@implementation OFString (CryptoHashing)
- (OFString *)of_cryptoHashWithClass: (Class <OFCryptoHash>)class
{
void *pool = objc_autoreleasePoolPush();
| | > | 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
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;
|
| ︙ | ︙ |