I develop an android application, and I used an open source library called cacheword to handle it's password. Now I want to set another password for it, which I mean I want my app has two password! But I can't do it, because according to this function of this library:
public void setPassphrase(char[] passphrase) throws GeneralSecurityException {
PassphraseSecrets ps;
if(SecretsManager.isInitialized(this.mContext)) {
ps = PassphraseSecrets.fetchSecrets(this.mContext, passphrase);
} else {
ps = PassphraseSecrets.initializeSecrets(this.mContext, passphrase);
if(ps == null) {
throw new GeneralSecurityException("initializeSecrets could not save the secrets.");
}
}
this.setCachedSecrets(ps);
}
it can set just one password. So I decided to change this method somehow and handle the second password! But when I start doing this, I understand it's not that too easy!! :)) Because it uses the other function of the library! Can you help me how can I solve this problem!?!