Differences From Artifact [c9ae48fd28]:
- File src/OFHMAC.m — part of check-in [320d638a21] at 2019-03-12 22:10:21 on branch trunk — OFCryptoHash: Add property for digest / block size (user: js, size: 4081) [annotate] [blame] [check-ins using]
To Artifact [8b2647f9b8]:
- File
src/OFHMAC.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: 4644) [annotate] [blame] [check-ins using]
︙ | |||
21 22 23 24 25 26 27 28 29 30 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | + + - + + + + + - - + + + + + + - + + + | #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFInvalidArgumentException.h" @implementation OFHMAC @synthesize hashClass = _hashClass; @synthesize allowsSwappableMemory = _allowsSwappableMemory; + (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)class allowsSwappableMemory: (bool)allowsSwappableMemory { |
︙ | |||
93 94 95 96 97 98 99 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - - + + + + | memset(innerKeyPadItems + length, 0, blockSize - length); for (size_t i = 0; i < blockSize; i++) { outerKeyPadItems[i] ^= 0x5C; innerKeyPadItems[i] ^= 0x36; } |
︙ |