9#include <QCryptographicHash>
19 if (
auto record = _db->getRecordByAlias(alias,
true)) {
20 record->setData(value);
21 if (_db->saveRecord(record)) {
22 return record->getHash();
30 _db->removeRecordByKey(key);
34 _db->removeRecordByAlias(alias);
38 if (
auto&& result = _db->getRecordByHash(key)) {
39 return result->getData();
47 if (
auto&& result = _db->getRecordByAlias(alias)) {
48 return result->getData();
QByteArray get(const QByteArray &key)
get return value by access key.
QByteArray add(const QByteArray &value, const QString &alias={})
add adds to storage new value, and return access key.
void remove(const QByteArray &key)
remove This method remove secret from storage by key.