@@ -53,11 +53,12 @@ return _length; } - (void)derivePassword { - OFSHA256Hash *siteHash = [OFSHA256Hash cryptoHash]; + OFSHA256Hash *siteHash = [OFSHA256Hash + cryptoHashWithAllowsSwappableMemory: true]; size_t passphraseLength, combinedPassphraseLength; char *combinedPassphrase; [siteHash updateWithBuffer: _site.UTF8String length: _site.UTF8StringLength]; @@ -87,11 +88,11 @@ memcpy(combinedPassphrase + passphraseLength, _keyFile.items, _keyFile.count); of_scrypt(8, 524288, 2, siteHash.digest, [siteHash.class digestSize], combinedPassphrase, - combinedPassphraseLength, _output, _length); + combinedPassphraseLength, _output, _length, true); } @finally { of_explicit_memset(combinedPassphrase, 0, combinedPassphraseLength); free(combinedPassphrase); }