Removed unnecessary parameter

This commit is contained in:
Sebastian Messmer 2015-11-11 11:02:01 -08:00
parent 3c2f26a287
commit f44ae98bf9
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ CryConfigFile CryConfigFile::create(const bf::path &path, CryConfig config, cons
if (bf::exists(path)) {
throw std::runtime_error("Config file exists already.");
}
auto result = CryConfigFile(path, std::move(config), CryConfigEncryptorFactory::deriveKey(config.Cipher(), password, scryptSettings));
auto result = CryConfigFile(path, std::move(config), CryConfigEncryptorFactory::deriveKey(password, scryptSettings));
result.save();
return result;
}

View File

@ -35,7 +35,7 @@ namespace cryfs {
return DerivedKey<CryConfigEncryptor::MaxTotalKeySize>(keyConfig, std::move(key));
}
unique_ref<CryConfigEncryptor> CryConfigEncryptorFactory::deriveKey(const string &cipherName, const string &password, const SCryptSettings &scryptSettings) {
unique_ref<CryConfigEncryptor> CryConfigEncryptorFactory::deriveKey(const string &password, const SCryptSettings &scryptSettings) {
auto derivedKey = cpputils::SCrypt().generateKey<CryConfigEncryptor::MaxTotalKeySize>(password, scryptSettings);
return make_unique_ref<CryConfigEncryptor>(std::move(derivedKey));
}

View File

@ -12,7 +12,7 @@ namespace cryfs {
//TODO Test
class CryConfigEncryptorFactory {
public:
static cpputils::unique_ref<CryConfigEncryptor> deriveKey(const std::string &cipherName, const std::string &password, const cpputils::SCryptSettings &scryptSettings);
static cpputils::unique_ref<CryConfigEncryptor> deriveKey(const std::string &password, const cpputils::SCryptSettings &scryptSettings);
static boost::optional<cpputils::unique_ref<CryConfigEncryptor>> loadKey(const cpputils::Data &ciphertext,
const std::string &password);