1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-09 22:57:54 +02:00

Fossil Hybrid: added decryption debug logs

This commit is contained in:
Daniel Dakhno 2020-10-30 01:28:59 +01:00
parent 8e543d0b9c
commit f48378c5dc

View File

@ -77,6 +77,7 @@ public abstract class FileEncryptedGetRequest extends FossilRequest {
cipher = Cipher.getInstance("AES/CTR/NoPadding");
try {
keySpec = new SecretKeySpec(this.adapter.getSecretKey(), "AES");
log("key: " + StringUtils.bytesToHex(keySpec.getEncoded()));
} catch (IllegalAccessException e) {
GB.toast("error getting key: " + e.getMessage(), Toast.LENGTH_LONG, GB.ERROR, e);
return;
@ -173,6 +174,7 @@ public abstract class FileEncryptedGetRequest extends FossilRequest {
byte[] result = cipher.doFinal(value);
log("decryption result: " + StringUtils.bytesToHex(result));
log("iv: " + StringUtils.bytesToHex(iv));
incrementIV();