Comments (6)
I'll take a look at it.
from openkeepass.
If I test with the code you provided it works perfectly on my system when I open the database with KeePass.
KeePassFile mDatabase = KeePassDatabase.getInstance(ResourceUtils.getResource("test1.kdbx")).openDatabase("test");
Group parentGroup = mDatabase.getRoot().getGroups().get(0);
Entry entry = mDatabase.getEntries().get(0);
Entry newEntry = new EntryBuilder(entry).username("hello1").buildWithHistory();
new GroupBuilder(parentGroup).removeEntry(entry).addEntry(newEntry).build();
KeePassDatabase.write(mDatabase, "test", ResourceUtils.getResource("test1.kdbx"));
Can you provide a bit more details?
- Is it working if you're trying it on a desktop system and not Android?
- You mentioned that
The password is "unreadable" for other keepass viewers
what are these other keepass viewers? Does it work with the original KeePass program?
3. Can you provide a testcase that is not working? As mentioned, the code above works for me.
from openkeepass.
Well it seems to be a problem with Android only.
Tried it on the Desktop and it works without problems.
On Android the same code results in a "destroyed" password field.
to answer your questions:
- It works on Desktop system
- I tried the "original" KeePass Password Safe v2.35 on Desktop. Keepass2Android and KeepassDroid
- I tried the same Code, on Android and Desktop. Works on Desktop, doesn't work on Android...
Below the file in it's different stages...
https://we.tl/dKwkjeJIeM
from openkeepass.
Just a short update:
I might have found a new "hint".
It seems like the gzip compression breaks the file on Android.
I just created a new kdbx file with the windows client and set compression to "none".
Now editing and saving files with you library seems to work without problems.
from openkeepass.
Thanks for the hint, I can reproduce the issue and trying to fix it.
from openkeepass.
I finally found the issue. The problem is not the gzip compression, it's the behavior of Simple XML on Android. It does not preserve the order of XML tags on Android.
However, I managed to fix the issue.
from openkeepass.
Related Issues (20)
- Reading / Writing Entry attachments HOT 3
- Memory leak HOT 1
- Password is gibberish when opening file last saved by KeeWeb HOT 7
- java 9 warning HOT 9
- getUsername does not resolve referenced field's value HOT 2
- Some improvement ideas HOT 1
- The key has the wrong size. Have you installed Java Cryptography Extension (JCE)? Is the master key correct? HOT 2
- Could not deserialize object to XML HOT 7
- Can't read other app's files HOT 12
- Is it possible to create a new database with the API ? HOT 1
- Trouble with reading of created by this library file.kdbx HOT 1
- EntryBuilder.iconData() strange behavior for me HOT 6
- ChaCha20 encryption with Argon2 key derivation support HOT 1
- openkeepass in Oracle 12c JVM Wrong IV length: must be 16 bytes long HOT 2
- Write database with keyfile
- writing to custom properties doesnt seem possible
- Idea to replace simple-xml-2.7.1.jar with com.carrotsearch.thirdparty:simple-xml-safe:2.7.1 ?
- KDBX 4 Support
- Why does it use spongycastle instead of bouncycastle?
- NPE loading keepass archive created using KeepassXC 2.7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openkeepass.