Files
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

36 lines
1.2 KiB
Java

package com.digitalturbine.ignite.encryption;
import android.util.Base64;
import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;
/* loaded from: classes2.dex */
public abstract class a {
public static Cipher a(int i, byte[] bArr, SecretKey secretKey) {
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
cipher.init(i, secretKey, new GCMParameterSpec(128, bArr));
return cipher;
}
public static String a(Cipher cipher, String str) {
CipherInputStream cipherInputStream = new CipherInputStream(new ByteArrayInputStream(Base64.decode(str, 0)), cipher);
ArrayList arrayList = new ArrayList();
while (true) {
int read = cipherInputStream.read();
if (read == -1) {
break;
}
arrayList.add(Byte.valueOf((byte) read));
}
byte[] bArr = new byte[arrayList.size()];
for (int i = 0; i < arrayList.size(); i++) {
bArr[i] = ((Byte) arrayList.get(i)).byteValue();
}
return new String(bArr, "UTF-8");
}
}