jorabin / KeePassJava2

Java API for KeePass Password Databases - Read/Write 2.x (File versions 3 and 4), Read 1.x
Apache License 2.0
246 stars 69 forks source link

add a Database#setRecycleBin(Group g) method #44

Open jorabin opened 1 year ago

jorabin commented 1 year ago

as mentioned by @aivanovski in his pull request #34 this would allow people to programmatically assign a group as a recycle bin for reasons including those stated in the pull request, of some implementations not hooking the metadata together correctly.

There will need to be some thought as to what happens when there is already a recycle bin assigned, would be grateful for some views. Here's the JavaDoc on getRecycleBin() as it currently stands.

giusvale-dev commented 1 year ago

KeePass2 creates a group (automatically) named "Recycle Bin" when an entry or a group is deleted. Then a user can't create a Group and mark it as "Recycle Bin".

I think we need to maintain the compatibility of all implementations and existing applications of KeePass2! You can't add this feature because if I export my KeePass2 database from this Java API to other KeePass applications (KeePass2 for Windows, KeePass XC, etc.) what happened? How do they interpret my deleted data?

I think could be wrong and maybe dangerous to implement this feature, so I suggest you close this issue because the current implementation of this API is compliant with the current implementation of the other KeePass projects!

Giuseppe