-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsecure_storage_linux.cpp
More file actions
107 lines (80 loc) · 2.24 KB
/
Copy pathsecure_storage_linux.cpp
File metadata and controls
107 lines (80 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "../../secure_storage.h"
namespace nativeapi {
class SecureStorage::Impl {
public:
explicit Impl(const std::string& scope) : scope_(scope) {
// Stub implementation - no initialization
}
~Impl() = default;
bool Set(const std::string& key, const std::string& value) {
// Stub implementation
return false;
}
std::string Get(const std::string& key, const std::string& default_value) const {
// Stub implementation
return default_value;
}
bool Remove(const std::string& key) {
// Stub implementation
return false;
}
bool Clear() {
// Stub implementation
return false;
}
bool Contains(const std::string& key) const {
// Stub implementation
return false;
}
std::vector<std::string> GetKeys() const {
// Stub implementation
return {};
}
size_t GetSize() const {
// Stub implementation
return 0;
}
std::map<std::string, std::string> GetAll() const {
// Stub implementation
return {};
}
std::string GetScope() const { return scope_; }
private:
std::string scope_;
};
// Constructor implementations
SecureStorage::SecureStorage() : SecureStorage("default") {}
SecureStorage::SecureStorage(const std::string& scope) : pimpl_(std::make_unique<Impl>(scope)) {}
SecureStorage::~SecureStorage() = default;
bool SecureStorage::Set(const std::string& key, const std::string& value) {
return pimpl_->Set(key, value);
}
std::string SecureStorage::Get(const std::string& key, const std::string& default_value) const {
return pimpl_->Get(key, default_value);
}
bool SecureStorage::Remove(const std::string& key) {
return pimpl_->Remove(key);
}
bool SecureStorage::Clear() {
return pimpl_->Clear();
}
bool SecureStorage::Contains(const std::string& key) const {
return pimpl_->Contains(key);
}
std::vector<std::string> SecureStorage::GetKeys() const {
return pimpl_->GetKeys();
}
size_t SecureStorage::GetSize() const {
return pimpl_->GetSize();
}
std::map<std::string, std::string> SecureStorage::GetAll() const {
return pimpl_->GetAll();
}
std::string SecureStorage::GetScope() const {
return pimpl_->GetScope();
}
bool SecureStorage::IsAvailable() {
// Stub implementation - report as unavailable
return false;
}
} // namespace nativeapi