kindahl / libkeepass Goto Github PK
View Code? Open in Web Editor NEWKeePass password database import/export library.
License: GNU General Public License v3.0
KeePass password database import/export library.
License: GNU General Public License v3.0
make -j8
mkdir -p build/debug/obj
g++ -MMD -g -DDEBUG -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/kdb.o src/kdb.cc
mkdir -p build/debug/obj/test
mkdir -p build/debug/obj/test
mkdir -p build/debug/obj/test
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/cipher.o test/cipher.cc
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/iterator.o test/iterator.cc
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/kdb.o test/kdb.cc
mkdir -p build/debug/obj/test
mkdir -p build/debug/obj/test
mkdir -p build/debug/obj/test
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/kdbx.o test/kdbx.cc
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/stream.o test/stream.cc
g++ -MMD -g -DDEBUG -Isrc/ -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/test/util.o test/util.cc
src/kdb.cc: В lambda функции:
src/kdb.cc:688:22: ошибка: «numeric_limits» не является элементом «std»
688 | if (level > std::numeric_limits<uint16_t>::max()) {
| ^~~~~~~~~~~~~~
src/kdb.cc:688:45: ошибка: expected primary-expression before «>» token
688 | if (level > std::numeric_limits<uint16_t>::max()) {
| ^
src/kdb.cc:688:48: ошибка: «::max» has not been declared; did you mean «std::max»?
688 | if (level > std::numeric_limits<uint16_t>::max()) {
| ^~~
| std::max
In file included from /usr/include/c++/11.1.0/algorithm:62,
from src/util.hh:20,
from src/entry.hh:27,
from src/group.hh:24,
from src/database.hh:24,
from src/kdb.hh:24,
from src/kdb.cc:19:
/usr/include/c++/11.1.0/bits/stl_algo.h:3467:5: замечание: «std::max» declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
src/kdb.cc:695:28: ошибка: «numeric_limits» не является элементом «std»
695 | if (num_groups == std::numeric_limits<decltype(num_groups)>::max()) {
| ^~~~~~~~~~~~~~
src/kdb.cc:695:43: ошибка: expected primary-expression before «decltype»
695 | if (num_groups == std::numeric_limits<decltype(num_groups)>::max()) {
| ^~~~~~~~~~~~~~~~~~~~
src/kdb.cc:695:43: ошибка: expected «)» before «decltype»
695 | if (num_groups == std::numeric_limits<decltype(num_groups)>::max()) {
| ~ ^~~~~~~~~~~~~~~~~~~~
| )
src/kdb.cc: В lambda функции:
src/kdb.cc:706:21: ошибка: loop variable «entry» creates a copy from type «const std::shared_ptrkeepass::Entry» [-Werror=range-loop-construct]
706 | for (const auto entry : group->Entries()) {
| ^~~~~
src/kdb.cc:706:21: замечание: use reference type to prevent copying
706 | for (const auto entry : group->Entries()) {
| ^~~~~
| &
src/kdb.cc:709:31: ошибка: «numeric_limits» не является элементом «std»
709 | if (num_entries == std::numeric_limits<decltype(num_entries)>::max()) {
| ^~~~~~~~~~~~~~
src/kdb.cc:709:46: ошибка: expected primary-expression before «decltype»
709 | if (num_entries == std::numeric_limits<decltype(num_entries)>::max()) {
| ^~~~~~~~~~~~~~~~~~~~~
src/kdb.cc:709:46: ошибка: expected «)» before «decltype»
709 | if (num_entries == std::numeric_limits<decltype(num_entries)>::max()) {
| ~ ^~~~~~~~~~~~~~~~~~~~~
| )
cc1plus: все предупреждения считаются ошибками
make: *** [Makefile:24: build/debug/obj/kdb.o] Ошибка 1
make: *** Ожидание завершения заданий…
keepass::Key key("password");
keepass::KdbxFile file;
std::unique_ptrkeepass::Database db = file.Import("in.kdbx", key);
file.Export("out.kdbx", *db.get(), key);
Creating the file "in.kdbx" with the KeePass 2 application.
Then running the code above (from the Using paragraph in the Readme file) outputs the file "out.kdbx" that when is opened with KeePass 2 application, the password of any entry is shown in Base64 instead of the explicit password.
I installed all the dependencies and even went back in the time with commits and it didn't compiled this build log is me building the latest version.
mkdir -p build/debug/obj
g++ -MMD -g -DDEBUG -std=c++11 -Wall -Wextra -Werror -c -o build/debug/obj/stream.o src/stream.cc
In file included from src/stream.hh:28:0,
from src/stream.cc:19:
src/util.hh:50:39: error: ‘vector’ in namespace ‘std’ does not name a template type
inline bool indirect_equal(const std::vector& v0,
^~~~~~
src/util.hh:50:45: error: expected ‘,’ or ‘...’ before ‘<’ token
inline bool indirect_equal(const std::vector& v0,
^
src/util.hh: In function ‘bool keepass::indirect_equal(int)’:
src/util.hh:52:21: error: ‘v0’ was not declared in this scope
return std::equal(v0.begin(), v0.end(), v1.begin(),
^~
src/util.hh:52:43: error: ‘v1’ was not declared in this scope
return std::equal(v0.begin(), v0.end(), v1.begin(),
^~
src/util.hh: At global scope:
src/util.hh:82:34: error: ‘vector’ in namespace ‘std’ does not name a template type
template <typename T, const std::vector<std::shared_ptr>& (T::*F)() const>
^~~~~~
src/util.hh: 100:13: error: expected unqualified-id before ‘time_to_str’
std::string time_to_str(const std::time_t& time);
^~~~~~~~~~~
src/util.hh: 100:13: error: expected ‘>’ before ‘time_to_str’
src/util.hh: 100:49: error: expected unqualified-id before ‘;’ token
std::string time_to_str(const std::time_t& time);
^
In file included from src/stream.cc:19:0:
src/stream.hh:103:8: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector block_;
^~~~~~
src/stream.hh:173:8: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector buffer_;
^~~~~~
src/stream.cc: In member function ‘std::array<unsigned char, 32ul> keepass::hashed_basic_streambuf::GetBlockHash() const’:
src/stream.cc:35:26: error: ‘block_’ was not declared in this scope
SHA256_Update(&sha256, block_.data(), block_.size());
^~~~~~
src/stream.cc: In member function ‘virtual int keepass::hashed_istreambuf::underflow()’:
src/stream.cc:52:5: error: ‘block_’ was not declared in this scope
block_.clear();
^~~~~~
src/stream.cc: In member function ‘bool keepass::hashed_ostreambuf::FlushBlock()’:
src/stream.cc:82:23: error: ‘block_’ was not declared in this scope
header.block_hash = block_.empty() ? kEmptyHash : GetBlockHash();
^~~~~~
src/stream.cc: In member function ‘virtual int keepass::hashed_ostreambuf::overflow(int)’:
src/stream.cc:103:3: error: ‘block_’ was not declared in this scope
block_.push_back(static_cast(c));
^~~~~~
src/stream.cc: In member function ‘virtual int keepass::hashed_ostreambuf::sync()’:
src/stream.cc:114:8: error: ‘block_’ was not declared in this scope
if (!block_.empty()) {
^~~~~~
src/stream.cc: In member function ‘bool keepass::gzip_ostreambuf::WriteOutput(bool)’:
src/stream.cc:201:24: error: ‘buffer_’ was not declared in this scope
z_stream_.avail_in = buffer_.size();
^~~~~~~
src/stream.cc: In member function ‘virtual int keepass::gzip_ostreambuf::overflow(int)’:
src/stream.cc:234:3: error: ‘buffer_’ was not declared in this scope
buffer_.push_back(static_cast(c));
^~~~~~~
Makefile:23: recipe for target 'build/debug/obj/stream.o' failed
make: *** [build/debug/obj/stream.o] Error 1
Using Debian 9.3 I didn't compiled any build tool myself. I don't know what I am doing wrong.
Also I tried replacing -std=c++11 with different versions.
(For some reason inserting the log as code make it appear as one paragraph of text)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.