Differences From Artifact [24505cc96a]:
- File
tests/OFSHA1HashTests.m
— part of check-in
[09be825f88]
at
2019-09-29 15:58:33
on branch trunk
— Remove OFAutoreleasePool
OFAutoreleasePools have long been discouraged in favor of the runtime's
autorelease pools. (user: js, size: 1670) [annotate] [blame] [check-ins using] [more...]
To Artifact [314899ff02]:
- File
tests/OFSHA1HashTests.m
— part of check-in
[e629dc83a9]
at
2019-12-27 00:41:54
on branch trunk
— OFSecureData: Add allowsSwappableMemory property
With this property, it's possible to specify whether the memory should
be protected from swapping or not. This makes it easier for e.g. the
crypto hash classes: They can now just always use OFSecureData without
wasting unswappable memory if it's not needed. (user: js, size: 1732) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
31 32 33 34 35 36 37 |
- (void)SHA1HashTests
{
void *pool = objc_autoreleasePoolPush();
OFSHA1Hash *sha1, *copy;
OFFile *f = [OFFile fileWithPath: @"testfile.bin"
mode: @"r"];
| > | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
- (void)SHA1HashTests
{
void *pool = objc_autoreleasePoolPush();
OFSHA1Hash *sha1, *copy;
OFFile *f = [OFFile fileWithPath: @"testfile.bin"
mode: @"r"];
TEST(@"+[cryptoHashWithAllowsSwappableMemory:]",
(sha1 = [OFSHA1Hash cryptoHashWithAllowsSwappableMemory: true]))
while (!f.atEndOfStream) {
char buf[64];
size_t len = [f readIntoBuffer: buf
length: 64];
[sha1 updateWithBuffer: buf
length: len];
|
| ︙ | ︙ |