I'm using sqlcipher to store data from my app and I'm having trouble firstly, generating a secret key and secondly storing in keystore.
Btw, needs to be without user interaction like described in android docs
Here is how I'm attempting to generate the secret,
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
keyGen.init(128);
SecretKey key = keyGen.generateKey();
Here, is where I'm setting up the sqldatabase
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(databaseFile, "password_string", null);
So the question, how do I use the secret in the password string? As at the moment, I can only get the secret as a byte array.