Differences From Artifact [5a22333932]:
- File src/OFMD5Hash.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 4741) [annotate] [blame] [check-ins using]
To Artifact [c7952ff29f]:
- File
src/OFMD5Hash.m
— part of check-in
[951f530aee]
at
2016-07-24 00:06:30
on branch trunk
— Rename OFHash to OFCryptoHash
OFHash is too generic, as this protocol is for cryptographic hashes. It
also solves the ambiguity of the +[hash] method (which is now
+[cryptoHash]), which conflicted with -[hash] on the class itself,
resulting in classes conforming to OFHash not being able to be used as a
key in an OFDictionary. (user: js, size: 4749) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
121 122 123 124 125 126 127 | } + (size_t)blockSize { return 64; } | | | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | } + (size_t)blockSize { return 64; } + (instancetype)cryptoHash { return [[[self alloc] init] autorelease]; } - init { self = [super init]; |
︙ | ︙ | |||
150 151 152 153 154 155 156 | - (void)updateWithBuffer: (const void*)buffer_ length: (size_t)length { const uint8_t *buffer = buffer_; if (_calculated) @throw [OFHashAlreadyCalculatedException | | | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - (void)updateWithBuffer: (const void*)buffer_ length: (size_t)length { const uint8_t *buffer = buffer_; if (_calculated) @throw [OFHashAlreadyCalculatedException exceptionWithObject: self]; _bits += (length * 8); while (length > 0) { size_t min = 64 - _bufferLength; if (min > length) |
︙ | ︙ |