aboutsummaryrefslogtreecommitdiff
path: root/include/odhtdb/LocalUserEncrypted.hpp
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-05-14 00:20:11 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-05-14 00:27:29 +0200
commit9af086151e6d9d3fe88f9e3e21797812a3e701ba (patch)
treea11889f81b8f929c11dccbd2c1c3b3cd74fbb740 /include/odhtdb/LocalUserEncrypted.hpp
parentebff7aeafded4dd9d245dbcfc80d9c8d83fe1242 (diff)
Replace files with sqlite
Using sqlite because sqlite has transactions, storing/loading from files automatically, unloading data that is not accessed often. Removed cosmetic data (node name, username). They can be added using addData by the application that uses odhtdb instead. Database callback functions can now be called with stored data using database.loadNode function. TODO: Add local user storage (with password) back, it has been temorary disabled
Diffstat (limited to 'include/odhtdb/LocalUserEncrypted.hpp')
-rw-r--r--include/odhtdb/LocalUserEncrypted.hpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/odhtdb/LocalUserEncrypted.hpp b/include/odhtdb/LocalUserEncrypted.hpp
index 952892f..7919cb3 100644
--- a/include/odhtdb/LocalUserEncrypted.hpp
+++ b/include/odhtdb/LocalUserEncrypted.hpp
@@ -22,9 +22,9 @@ namespace odhtdb
class LocalUserEncrypted
{
public:
- static LocalUserEncrypted* create(const Signature::PublicKey &publicKey, const EncryptedPrivateKey &encryptedPrivateKey, const std::string &name)
+ static LocalUserEncrypted* create(const Signature::PublicKey &publicKey, const EncryptedPrivateKey &encryptedPrivateKey)
{
- return new LocalUserEncrypted(publicKey, encryptedPrivateKey, name);
+ return new LocalUserEncrypted(publicKey, encryptedPrivateKey);
}
const Signature::PublicKey& getPublicKey() const
@@ -36,22 +36,15 @@ namespace odhtdb
{
return encryptedPrivateKey;
}
-
- const std::string& getName() const
- {
- return name;
- }
private:
- LocalUserEncrypted(const Signature::PublicKey &_publicKey, const EncryptedPrivateKey &_encryptedPrivateKey, const std::string &_name) :
+ LocalUserEncrypted(const Signature::PublicKey &_publicKey, const EncryptedPrivateKey &_encryptedPrivateKey) :
publicKey(_publicKey),
- encryptedPrivateKey(_encryptedPrivateKey),
- name(_name)
+ encryptedPrivateKey(_encryptedPrivateKey)
{
}
private:
Signature::PublicKey publicKey;
EncryptedPrivateKey encryptedPrivateKey;
- std::string name;
};
}