@@ -21,11 +21,11 @@ */ #import "LegacyPasswordGenerator.h" @implementation LegacyPasswordGenerator -@synthesize site = _site, keyfile = _keyfile, passphrase = _passphrase; +@synthesize site = _site, keyFile = _keyFile, passphrase = _passphrase; @synthesize output = _output; + (instancetype)generator { return [[[self alloc] init] autorelease]; @@ -68,26 +68,26 @@ } _output = [self allocMemoryWithSize: _length + 1]; passphraseLength = combinedPassphraseLength = strlen(_passphrase); - if (_keyfile != nil) { - if (SIZE_MAX - combinedPassphraseLength < _keyfile.count) + if (_keyFile != nil) { + if (SIZE_MAX - combinedPassphraseLength < _keyFile.count) @throw [OFOutOfRangeException exception]; - combinedPassphraseLength += _keyfile.count; + combinedPassphraseLength += _keyFile.count; } if ((combinedPassphrase = malloc(combinedPassphraseLength)) == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: combinedPassphraseLength]; @try { memcpy(combinedPassphrase, _passphrase, passphraseLength); - if (_keyfile != nil) + if (_keyFile != nil) memcpy(combinedPassphrase + passphraseLength, - _keyfile.items, _keyfile.count); + _keyFile.items, _keyFile.count); of_scrypt(8, 524288, 2, siteHash.digest, [siteHash.class digestSize], combinedPassphrase, combinedPassphraseLength, _output, _length); } @finally {