Files
rr3-apk/decompiled/sources/com/digitalturbine/ignite/encryption/d.java
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

25 lines
995 B
Java

package com.digitalturbine.ignite.encryption;
import android.util.Base64;
import android.util.Pair;
import java.io.ByteArrayOutputStream;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.CipherOutputStream;
import javax.crypto.SecretKey;
/* loaded from: classes2.dex */
public final class d {
public static Pair a(SecretKey secretKey, String str) {
byte[] generateSeed = new SecureRandom().generateSeed(12);
Cipher a = a.a(1, generateSeed, secretKey);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
CipherOutputStream cipherOutputStream = new CipherOutputStream(byteArrayOutputStream, a);
cipherOutputStream.write(str.getBytes("UTF-8"));
cipherOutputStream.close();
byte[] byteArray = byteArrayOutputStream.toByteArray();
byteArrayOutputStream.close();
return new Pair(Base64.encodeToString(generateSeed, 0), Base64.encodeToString(byteArray, 0));
}
}