Differences From Artifact [0013993037]:
- File
src/OFDataArray+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: 1806) [annotate] [blame] [check-ins using]
To 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]
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #import "OFDataArray.h" #import "OFString.h" #import "OFHash.h" #import "OFMD5Hash.h" #import "OFSHA1Hash.h" #import "OFSHA256Hash.h" int _OFDataArray_Hashing_reference; @implementation OFDataArray (Hashing) - (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass { | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #import "OFDataArray.h" #import "OFString.h" #import "OFHash.h" #import "OFMD5Hash.h" #import "OFSHA1Hash.h" #import "OFSHA224Hash.h" #import "OFSHA256Hash.h" int _OFDataArray_Hashing_reference; @implementation OFDataArray (Hashing) - (OFString*)OF_hashAsStringWithHash: (Class <OFHash>)hashClass { |
︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 | return [self OF_hashAsStringWithHash: [OFMD5Hash class]]; } - (OFString*)SHA1Hash { return [self OF_hashAsStringWithHash: [OFSHA1Hash class]]; } - (OFString*)SHA256Hash { return [self OF_hashAsStringWithHash: [OFSHA256Hash class]]; } @end | > > > > > | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 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 |