Index: LegacyPasswordGenerator.m ================================================================== --- LegacyPasswordGenerator.m +++ LegacyPasswordGenerator.m @@ -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); } Index: NewPasswordGenerator.m ================================================================== --- NewPasswordGenerator.m +++ NewPasswordGenerator.m @@ -40,11 +40,12 @@ return self; } - (void)derivePassword { - OFSHA384Hash *siteHash = [OFSHA384Hash cryptoHash]; + OFSHA384Hash *siteHash = [OFSHA384Hash + cryptoHashWithAllowsSwappableMemory: true]; size_t passphraseLength, combinedPassphraseLength; char *combinedPassphrase; [siteHash updateWithBuffer: _site.UTF8String length: _site.UTF8StringLength]; @@ -74,11 +75,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); }