- I am working on an application in which I would like to create a keystore with a master password and store user passwords after hashing inside it. Is it possible to do so?
- I am working in Java, so I would appreciate Java based solutions. I am also checking how to create keystore in Java code itself.
Currently I have :
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "some password".toCharArray();
ks.load(null, password);
FileOutputStream fos = new FileOutputStream("newKeyStoreFileName");
ks.store(fos, password);
fos.close();
I don't know if it is possible to store Strings in keystore, if not then I am looking to someway store those hashed passwords but encrypted again with a master-password. Any help would be nice. Thanks a lot. :-)
Aucun commentaire:
Enregistrer un commentaire