Differences From Artifact [b37a0e9886]:
- File src/OFData+CryptographicHashing.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 2379) [annotate] [blame] [check-ins using]
To Artifact [caf70aabc2]:
- File
src/OFData+CryptographicHashing.m
— part of check-in
[82801897d3]
at
2022-03-25 10:22:55
on branch trunk
— OFCryptographicHash: Add -[calculate]
Before, -[digest] would do the final calculation, however, this would
mean a property modifies state, which is bad. (user: js, size: 2398) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | [class hashWithAllowsSwappableMemory: true]; size_t digestSize = [class digestSize]; const unsigned char *digest; char cString[digestSize * 2]; [hash updateWithBuffer: self->_items length: self->_count * self->_itemSize]; digest = hash.digest; for (size_t i = 0; i < digestSize; i++) { uint8_t high, low; high = digest[i] >> 4; low = digest[i] & 0x0F; | > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | [class hashWithAllowsSwappableMemory: true]; size_t digestSize = [class digestSize]; const unsigned char *digest; char cString[digestSize * 2]; [hash updateWithBuffer: self->_items length: self->_count * self->_itemSize]; [hash calculate]; digest = hash.digest; for (size_t i = 0; i < digestSize; i++) { uint8_t high, low; high = digest[i] >> 4; low = digest[i] & 0x0F; |
︙ | ︙ |