Differences From Artifact [ef503698d2]:
- File
src/OFString+Hashing.m
— part of check-in
[46af1252a5]
at
2014-09-01 11:08:43
on branch trunk
— Add OFSHA256Hash
Took me some time to figure out the RFC is buggy and SSIG0(t-15) should
be SSIG0(W(t-15))... (user: js, size: 1792) [annotate] [blame] [check-ins using]
To Artifact [7422385e15]:
- File
src/OFString+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: 1908) [annotate] [blame] [check-ins using]
| ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + |
#include "config.h"
#import "OFString.h"
#import "OFHash.h"
#import "OFMD5Hash.h"
#import "OFSHA1Hash.h"
#import "OFSHA224Hash.h"
#import "OFSHA256Hash.h"
int _OFString_Hashing_reference;
@implementation OFString (Hashing)
- (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass
{
|
| ︙ | |||
60 61 62 63 64 65 66 67 68 69 70 71 72 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | + + + + + |
return [self OF_hashAsStringWithHash: [OFMD5Hash class]];
}
- (OFString*)SHA1Hash
{
return [self OF_hashAsStringWithHash: [OFSHA1Hash class]];
}
- (OFString*)SHA224Hash
{
return [self OF_hashAsStringWithHash: [OFSHA224Hash class]];
}
- (OFString*)SHA256Hash
{
return [self OF_hashAsStringWithHash: [OFSHA256Hash class]];
}
@end
|