-
Notifications
You must be signed in to change notification settings - Fork 54
WhatsApp Keystore
Ben edited this page Mar 1, 2021
·
1 revision
- Add this repository as dependency in your project.
- Copy the
client_static_keypair_pwd_enc
from thekeystore.xml
. It will look like this:
[2,"ciphertextBase64","ivBase64","saltBase64","passwordBase64"]
- Convert this XML-ish JSON to real JSON by replacing the HTML Entities by their real characters. That will look like this:
[2,"ciphertextBase64","ivBase64","saltBase64","passwordBase64"]
- Decrypt your token with some code:
//Make a JSONArray from the JSON string
JSONArray jsonArr = new JSONArray("[2,\"ciphertextBase64\",\"ivBase64\",\"saltBase64\",\"passwordBase64\"]");
//Make a EncryptedClientStaticKeypair from a JSON Array object
EncryptedClientStaticKeypair enc = EncryptedClientStaticKeypair.fromJSONArray(jsonArr);
//Decrypt the keypair
byte[] client_static_keypair = enc.decrypt();
//Print the keypair as Base64 value
System.err.println(Base64.getEncoder().encodeToString(client_static_keypair));
WAPI!!!
WAPI!!!