Feature : --key-file option for CLI (#816)
* removing readFromLine * Removing gui-prompt * execute uses an arg list. * Testing with key-file * Fixing the -a option in EntropyMeter.
This commit is contained in:
@@ -80,29 +80,6 @@ CompositeKey& CompositeKey::operator=(const CompositeKey& key)
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read a key from a line of input.
|
||||
* If the line references a valid file
|
||||
* path, the key is loaded from file.
|
||||
*/
|
||||
CompositeKey CompositeKey::readFromLine(QString line)
|
||||
{
|
||||
|
||||
CompositeKey key;
|
||||
if (QFile::exists(line)) {
|
||||
FileKey fileKey;
|
||||
fileKey.load(line);
|
||||
key.addKey(fileKey);
|
||||
}
|
||||
else {
|
||||
PasswordKey password;
|
||||
password.setPassword(line);
|
||||
key.addKey(password);
|
||||
}
|
||||
return key;
|
||||
|
||||
}
|
||||
|
||||
QByteArray CompositeKey::rawKey() const
|
||||
{
|
||||
CryptoHash cryptoHash(CryptoHash::Sha256);
|
||||
|
||||
Reference in New Issue
Block a user