Comments (8)
Not at present, I'm afraid.
from keepassjava2.
In case anyone need it.
I've created a workaround:
public class MyCredentials implements Credentials {
private final byte[] key;
public MyCredentials(String password, InputStream inputStream) {
MessageDigest md = Encryption.getMessageDigestInstance();
byte[] pwKey = md.digest(password.getBytes());
byte[] keyFileData = new byte[0];
try {
keyFileData = ByteStreams.toByteArray(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
if(keyFileData == null) {
throw new IllegalStateException("Could not read key file");
} else {
key = md.digest(Bytes.concat(pwKey, keyFileData));
}
}
public byte[] getKey() {
return this.key;
}
}
from keepassjava2.
to be clear, this is for kdb files rather than kdbx?
from keepassjava2.
Yes, actually is for a kdb file generated with KeePass 1.x
from keepassjava2.
I had a problem using this, since it seems that I can only generate hex encoded kdb key files and this doesn't convert from hex.
I've pushed a modification to KdbCredentials to the develop branch. It would be great if you could test it please. And if you have an example keyfile that is not hex encoded it would be useful to have this for testing.
from keepassjava2.
from keepassjava2.
from keepassjava2.
OK, thanks. I'll merge to master anyway.
from keepassjava2.
Related Issues (20)
- java.lang.NoSuchMethodError saving SimpleDatabase on Android HOT 10
- [Bug] Issues with Dependencies HOT 19
- Unparseable date HOT 8
- Passwords should be wiped from memory HOT 7
- Loading database failed: race condition in HashedBlockInputStream HOT 1
- compile error with Java 11 HOT 5
- Custom icons cause problems HOT 3
- Writing and saving to V4-ChaCha-AES/test123-ChaCha20-AES saves them with AES encryption HOT 5
- Error on trying to load the database with KeyFile + Master Password HOT 2
- Support latest version of KeePass HOT 2
- SimpleXML doesn't play nicely with Java17 HOT 4
- KeyFiles HOT 2
- JAXB save encrypts passwords in source database HOT 1
- add a Database#setRecycleBin(Group g) method HOT 1
- Excessively chatty output on tests HOT 2
- Clean the decrypted password after usage HOT 1
- Jackson implementation corrupts database on save
- Jackson implementation doesn't encrypt fields that are to be encrypted by default
- Database allows to create properties with the same name HOT 2
- It Seems we haven't an API to set a property as "protected" HOT 3
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 keepassjava2.