Switched ConnectionConfig to QString from std::string to fit better into Qt framework
This commit is contained in:
parent
bcfd82c27d
commit
082293e58a
20 changed files with 1077 additions and 211 deletions
|
|
@ -61,14 +61,14 @@ public:
|
|||
return base64_encode(wrapped_key);
|
||||
}
|
||||
|
||||
secure_vector<uint8_t> get(const std::string& name, const std::string &wrapped_key) const
|
||||
secure_vector<uint8_t> get(const std::string& name, const std::string_view &wrapped_key) const
|
||||
{
|
||||
const std::vector<uint8_t> wrapped_name =
|
||||
nist_key_wrap_padded(cast_char_ptr_to_uint8(name.data()),
|
||||
name.size(),
|
||||
*m_cipher);
|
||||
|
||||
const secure_vector<uint8_t> val = base64_decode(wrapped_key);
|
||||
const secure_vector<uint8_t> val = base64_decode(wrapped_key.data(), wrapped_key.size());
|
||||
|
||||
std::unique_ptr<BlockCipher> wrap_cipher(m_cipher->clone());
|
||||
wrap_cipher->set_key(m_hmac->process(wrapped_name));
|
||||
|
|
@ -169,7 +169,7 @@ std::string PasswordManager::encrypt(const std::string &name, const std::string
|
|||
}
|
||||
}
|
||||
|
||||
std::string PasswordManager::decrypt(const std::string &id, const std::string &encpwd)
|
||||
std::string PasswordManager::decrypt(const std::string &id, const std::string_view &encpwd)
|
||||
{
|
||||
if (m_cryptoEngine) {
|
||||
secure_vector<uint8_t> decoded = m_cryptoEngine->get(id, encpwd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue