Differences From Artifact [490f0952c5]:
- File tests/OFHMACTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 5088) [annotate] [blame] [check-ins using]
To Artifact [f9913e8e72]:
- File
tests/OFHMACTests.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: 5086) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
48 49 50 51 52 53 54 | "\xC9\xE1\x1F\xD7\xC7\xE5\x59\x33\xD5\x2F\xAF\x56\x1C\x94\xC8\xA4" "\x61\xB3\xF9\x1A\xE3\x09\x43\xA6\x5B\x85\xB1\x50\x5B\xCB\x1A\x2E" "\xB7\xE8\x87\xC1\x73\x19\x63\xF6\xA2\x91\x8D\x7E\x2E\xCC\xEC\x99"; @implementation TestsAppDelegate (OFHMACTests) - (void)HMACTests { | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | "\xC9\xE1\x1F\xD7\xC7\xE5\x59\x33\xD5\x2F\xAF\x56\x1C\x94\xC8\xA4" "\x61\xB3\xF9\x1A\xE3\x09\x43\xA6\x5B\x85\xB1\x50\x5B\xCB\x1A\x2E" "\xB7\xE8\x87\xC1\x73\x19\x63\xF6\xA2\x91\x8D\x7E\x2E\xCC\xEC\x99"; @implementation TestsAppDelegate (OFHMACTests) - (void)HMACTests { void *pool = objc_autoreleasePoolPush(); OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"r"]; OFHMAC *HMAC_MD5, *HMAC_SHA1, *HMAC_RMD160; OFHMAC *HMAC_SHA256, *HMAC_SHA384, *HMAC_SHA512; TEST(@"+[HMACWithHashClass:] with MD5", (HMAC_MD5 = [OFHMAC HMACWithHashClass: [OFMD5Hash class]])) |
︙ | ︙ | |||
126 127 128 129 130 131 132 | TEST(@"-[digest] with SHA-384", memcmp(HMAC_SHA384.digest, digest_sha384, HMAC_SHA384.digestSize) == 0) TEST(@"-[digest] with SHA-512", memcmp(HMAC_SHA512.digest, digest_sha512, HMAC_SHA512.digestSize) == 0) | | | 126 127 128 129 130 131 132 133 134 135 | TEST(@"-[digest] with SHA-384", memcmp(HMAC_SHA384.digest, digest_sha384, HMAC_SHA384.digestSize) == 0) TEST(@"-[digest] with SHA-512", memcmp(HMAC_SHA512.digest, digest_sha512, HMAC_SHA512.digestSize) == 0) objc_autoreleasePoolPop(pool); } @end |