Removed unnecessary parameter
This commit is contained in:
parent
3c2f26a287
commit
f44ae98bf9
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user