diff --git a/LegacyPasswordGenerator.m b/LegacyPasswordGenerator.m index b819162..cebe02e 100644 --- a/LegacyPasswordGenerator.m +++ b/LegacyPasswordGenerator.m @@ -55,7 +55,8 @@ - (void)derivePassword { - OFSHA256Hash *siteHash = [OFSHA256Hash cryptoHash]; + OFSHA256Hash *siteHash = [OFSHA256Hash + cryptoHashWithAllowsSwappableMemory: true]; size_t passphraseLength, combinedPassphraseLength; char *combinedPassphrase; @@ -89,7 +90,7 @@ 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); diff --git a/NewPasswordGenerator.m b/NewPasswordGenerator.m index 9d776ed..7542d5e 100644 --- a/NewPasswordGenerator.m +++ b/NewPasswordGenerator.m @@ -42,7 +42,8 @@ - (void)derivePassword { - OFSHA384Hash *siteHash = [OFSHA384Hash cryptoHash]; + OFSHA384Hash *siteHash = [OFSHA384Hash + cryptoHashWithAllowsSwappableMemory: true]; size_t passphraseLength, combinedPassphraseLength; char *combinedPassphrase; @@ -76,7 +77,7 @@ 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);