#IM trying to Decrypt AES I Reversed the apk

5 messages · Page 1 of 1 (latest)

vast badge
#

How i can find the IvParameterSpec

import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

/* loaded from: classes.dex */
final class a implements b.b.a.a.r0.g {

    /* renamed from: a  reason: collision with root package name */
    private final b.b.a.a.r0.g f2900a;

    /* renamed from: b  reason: collision with root package name */
    private final byte[] f2901b;

    /* renamed from: c  reason: collision with root package name */
    private final byte[] f2902c;

    /* renamed from: d  reason: collision with root package name */
    private CipherInputStream f2903d;

    public a(b.b.a.a.r0.g gVar, byte[] bArr, byte[] bArr2) {
        this.f2900a = gVar;
        this.f2901b = bArr;
        this.f2902c = bArr2;
    }

    @Override // b.b.a.a.r0.g
    public long a(b.b.a.a.r0.j jVar) {
        try {
            Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
            try {
                cipher.init(2, new SecretKeySpec(this.f2901b, "AES"), new IvParameterSpec(this.f2902c));
                b.b.a.a.r0.i iVar = new b.b.a.a.r0.i(this.f2900a, jVar);
                this.f2903d = new CipherInputStream(iVar, cipher);
                iVar.x();
                return -1L;
            } catch (InvalidAlgorithmParameterException | InvalidKeyException e2) {
                throw new RuntimeException(e2);
            }
        } catch (NoSuchAlgorithmException | NoSuchPaddingException e3) {
            throw new RuntimeException(e3);
        }
    }

    @Override // b.b.a.a.r0.g
    public int b(byte[] bArr, int i, int i2) {
        b.b.a.a.s0.a.f(this.f2903d != null);
        int read = this.f2903d.read(bArr, i, i2);
        if (read < 0) {
            return -1;
        }
        return read;
    }

quartz novaBOT
slender summit
#

just run it in debug mode and inspect changes

marsh ore
slender summit
#

@vast badge Please don't reserve multiple channels for the same question