Hi all,

I'm wondering if the following code is right in order to create a secretkey with cacheword and if this key is directly used by chatsecure to encrypt a DB with SQLCipher. From my test, it seems that I'm missing some step.

I hope you can help me.

After my signature, the code used. The question is: is x_rawSecretKey the right key to use with SQLCipher?

Best,

Massimo

String encodedSecret = "AAAAAQAAH0AcWGkQhZcNYf8pD5hSleo7zk5Qy63/Ueh4zb46nV+vjH14Km2nbIteiJNPx+nwcVB4Dre7xB9LLElEAm/jF4XdVsuqF2HuyspDQNxU";

String passphrase = "mypassword2016";

char[] x_passphrase = passphrase.toCharArray();

byte[] preparedSecret = android.util.Base64.decode(encodedSecret,Base64.DEFAULT);

SerializedSecretsV1 ss = new SerializedSecretsLoader().loadSecrets(preparedSecret);

byte[] x_rawSecretKey = null;

PassphraseSecretsImpl crypto = new PassphraseSecretsImpl();

*x_rawSecretKey* = crypto.decryptWithPassphrase(x_passphrase,ss);


_______________________________________________
List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
To unsubscribe, email:  [email protected]

Reply via email to