Index: CryptoPassphrase.m ================================================================== --- CryptoPassphrase.m +++ CryptoPassphrase.m @@ -153,11 +153,11 @@ passphraseCString = getpass(promptCString); passphraseLength = strlen(passphraseCString); @try { passphrase = [OFSecureData dataWithCount: passphraseLength + 1 - allowsSwappableMemory: false]; + allowsSwappableMemory: true]; memcpy(passphrase.mutableItems, passphraseCString, passphraseLength + 1); } @finally { of_explicit_memset(passphraseCString, '\0', passphraseLength); } Index: LegacyPasswordGenerator.m ================================================================== --- LegacyPasswordGenerator.m +++ LegacyPasswordGenerator.m @@ -66,11 +66,11 @@ length: _site.UTF8StringLength]; [_output release]; _output = nil; _output = [[OFSecureData alloc] initWithCount: _length + 1 - allowsSwappableMemory: false]; + allowsSwappableMemory: true]; passphraseLength = combinedPassphraseLength = _passphrase.count - 1; if (_keyFile != nil) { if (SIZE_MAX - combinedPassphraseLength < _keyFile.count) @throw [OFOutOfRangeException exception]; @@ -78,11 +78,11 @@ combinedPassphraseLength += _keyFile.count; } combinedPassphrase = [OFSecureData dataWithCount: combinedPassphraseLength - allowsSwappableMemory: false]; + allowsSwappableMemory: true]; combinedPassphraseItems = combinedPassphrase.mutableItems; memcpy(combinedPassphraseItems, _passphrase.items, passphraseLength); if (_keyFile != nil) memcpy(combinedPassphraseItems + passphraseLength, @@ -97,11 +97,11 @@ .saltLength = [siteHash.class digestSize], .password = combinedPassphraseItems, .passwordLength = combinedPassphraseLength, .key = outputItems, .keyLength = _length, - .allowsSwappableMemory = false + .allowsSwappableMemory = true }); /* * This has a bias, however, this is what scrypt-genpass does and the * legacy mode wants to be compatible to scrypt-genpass. Index: NewPasswordGenerator.m ================================================================== --- NewPasswordGenerator.m +++ NewPasswordGenerator.m @@ -53,11 +53,11 @@ length: _site.UTF8StringLength]; [_output release]; _output = nil; _output = [[OFSecureData alloc] initWithCount: _length + 1 - allowsSwappableMemory: false]; + allowsSwappableMemory: true]; passphraseLength = combinedPassphraseLength = _passphrase.count - 1; if (_keyFile != nil) { if (SIZE_MAX - combinedPassphraseLength < _keyFile.count) @throw [OFOutOfRangeException exception]; @@ -65,11 +65,11 @@ combinedPassphraseLength += _keyFile.count; } combinedPassphrase = [OFSecureData dataWithCount: combinedPassphraseLength - allowsSwappableMemory: false]; + allowsSwappableMemory: true]; combinedPassphraseItems = combinedPassphrase.mutableItems; memcpy(combinedPassphraseItems, _passphrase.items, passphraseLength); if (_keyFile != nil) memcpy(combinedPassphraseItems + passphraseLength, @@ -84,11 +84,11 @@ .saltLength = [siteHash.class digestSize], .password = combinedPassphraseItems, .passwordLength = combinedPassphraseLength, .key = outputItems, .keyLength = _length, - .allowsSwappableMemory = false + .allowsSwappableMemory = true }); for (size_t i = 0; i < _length; i++) outputItems[i] = "123456789"