Adjust to ObjFW changes

FossilOrigin-Name: 6de67efc1dd582456e997257b798b9c0e27b1d26eb7008881a55d60914bdcea9
This commit is contained in:
Jonathan Schleifer 2020-06-24 17:23:23 +00:00
parent 7fa276aae6
commit 63962cf9b8
2 changed files with 24 additions and 6 deletions

View file

@ -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

View file

@ -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] =