diff --git a/LegacyPasswordGenerator.m b/LegacyPasswordGenerator.m index c5ae33d..5cf639c 100644 --- a/LegacyPasswordGenerator.m +++ b/LegacyPasswordGenerator.m @@ -89,9 +89,18 @@ _keyFile.items, _keyFile.count); outputItems = _output.mutableItems; - of_scrypt(8, 524288, 2, siteHash.digest, [siteHash.class digestSize], - combinedPassphraseItems, combinedPassphraseLength, outputItems, - _length, true); + of_scrypt((of_scrypt_parameters_t){ + .blockSize = 8, + .costFactor = 524288, + .parallelization = 2, + .salt = siteHash.digest, + .saltLength = [siteHash.class digestSize], + .password = combinedPassphraseItems, + .passwordLength = combinedPassphraseLength, + .key = outputItems, + .keyLength = _length, + .allowsSwappableMemory = false + }); /* * This has a bias, however, this is what scrypt-genpass does and the diff --git a/NewPasswordGenerator.m b/NewPasswordGenerator.m index b987918..af049a7 100644 --- a/NewPasswordGenerator.m +++ b/NewPasswordGenerator.m @@ -76,9 +76,18 @@ _keyFile.items, _keyFile.count); outputItems = _output.mutableItems; - of_scrypt(8, 524288, 2, siteHash.digest, [siteHash.class digestSize], - combinedPassphraseItems, combinedPassphraseLength, outputItems, - _length, true); + of_scrypt((of_scrypt_parameters_t){ + .blockSize = 8, + .costFactor = 524288, + .parallelization = 2, + .salt = siteHash.digest, + .saltLength = [siteHash.class digestSize], + .password = combinedPassphraseItems, + .passwordLength = combinedPassphraseLength, + .key = outputItems, + .keyLength = _length, + .allowsSwappableMemory = false + }); for (size_t i = 0; i < _length; i++) outputItems[i] =