Differences From Artifact [d50a626d64]:
- File src/OFSHA1Hash.m — part of check-in [d43eb177bc] at 2011-09-19 12:34:21 on branch trunk — BOOL naming conventions. (user: js, size: 5349) [annotate] [blame] [check-ins using]
To Artifact [8c5830ca8e]:
- File
src/OFSHA1Hash.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 5358) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
160 161 162 163 164 165 166 | - (void)updateWithBuffer: (const char*)buffer_ length: (size_t)length { if (length == 0) return; if (calculated) | | > | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - (void)updateWithBuffer: (const char*)buffer_ length: (size_t)length { if (length == 0) return; if (calculated) @throw [OFHashAlreadyCalculatedException exceptionWithClass: isa hash: self]; sha1_update(state, &count, buffer, buffer_, length); } - (uint8_t*)digest { size_t i; |
︙ | ︙ |