Differences From Artifact [fbdb761c67]:
- File src/OFRIPEMD160Hash.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: 5577) [annotate] [blame] [check-ins using]
To Artifact [93d7f36836]:
- File
src/OFRIPEMD160Hash.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: 5585) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
135 136 137 138 139 140 141 | } + (size_t)blockSize { return 64; } | | | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | } + (size_t)blockSize { return 64; } + (instancetype)cryptoHash { return [[[self alloc] init] autorelease]; } - init { self = [super init]; |
︙ | ︙ | |||
165 166 167 168 169 170 171 | - (void)updateWithBuffer: (const void*)buffer_ length: (size_t)length { const uint8_t *buffer = buffer_; if (_calculated) @throw [OFHashAlreadyCalculatedException | | | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - (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) |
︙ | ︙ |