Differences From Artifact [033730b92a]:
- File
src/OFDataArray+Hashing.m
— part of check-in
[a1931f59a2]
at
2014-09-01 23:42:55
on branch trunk
— Add OFSHA224Hash
This creates a common base for OFSHA224Hash and OFSHA256Hash so that all
code (except the different initialization constants) is reused. (user: js, size: 1922) [annotate] [blame] [check-ins using]
To Artifact [bed64e507e]:
- File src/OFDataArray+Hashing.m — part of check-in [23f6c0f84d] at 2014-09-03 15:46:47 on branch trunk — Add OFSHA384Hash and OFSHA512Hash (user: js, size: 2154) [annotate] [blame] [check-ins using]
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + |
#import "OFDataArray.h"
#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"
#import "OFSHA224Hash.h"
#import "OFSHA256Hash.h"
#import "OFSHA384Hash.h"
#import "OFSHA512Hash.h"
int _OFDataArray_Hashing_reference;
@implementation OFDataArray (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
void *pool = objc_autoreleasePoolPush();
|
| ︙ | |||
72 73 74 75 76 77 78 79 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + + + + + + + + + + |
return [self OF_hashAsStringWithHash: [OFSHA224Hash class]];
}
- (OFString*)SHA256Hash
{
return [self OF_hashAsStringWithHash: [OFSHA256Hash class]];
}
- (OFString*)SHA384Hash
{
return [self OF_hashAsStringWithHash: [OFSHA384Hash class]];
}
- (OFString*)SHA512Hash
{
return [self OF_hashAsStringWithHash: [OFSHA512Hash class]];
}
@end
|