- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
25 lines
995 B
Java
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));
|
|
}
|
|
}
|