Differences From Artifact [cb91073b60]:
- File
src/scrypt.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 6166) [annotate] [blame] [check-ins using]
To Artifact [41ace0d09a]:
- File
src/scrypt.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 6168) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
177 178 179 180 181 182 183 | @throw [OFOutOfMemoryException exceptionWithRequestedSize: parallelization * 128 * blockSize]; HMAC = [[OFHMAC alloc] initWithHashClass: [OFSHA256Hash class]]; of_pbkdf2(HMAC, 1, salt, saltLength, password, passwordLength, | | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | @throw [OFOutOfMemoryException exceptionWithRequestedSize: parallelization * 128 * blockSize]; HMAC = [[OFHMAC alloc] initWithHashClass: [OFSHA256Hash class]]; of_pbkdf2(HMAC, 1, salt, saltLength, password, passwordLength, (unsigned char *)buffer, parallelization * 128 * blockSize); for (size_t i = 0; i < parallelization; i++) of_scrypt_romix(buffer + i * 32 * blockSize, blockSize, costFactor, tmp); of_pbkdf2(HMAC, 1, (unsigned char *)buffer, parallelization * 128 * blockSize, password, passwordLength, key, keyLength); } @finally { of_explicit_memset(tmp, 0, (costFactor + 1) * blockSize * 128); free(tmp); of_explicit_memset(buffer, 0, parallelization * 128 * blockSize); |
︙ | ︙ |