58 lines
2.2 KiB
Java
58 lines
2.2 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.security.keystore.KeyGenParameterSpec;
|
||
|
import java.math.BigInteger;
|
||
|
import java.security.Key;
|
||
|
import java.security.spec.AlgorithmParameterSpec;
|
||
|
import java.security.spec.MGF1ParameterSpec;
|
||
|
import java.util.Calendar;
|
||
|
import javax.crypto.Cipher;
|
||
|
import javax.crypto.spec.OAEPParameterSpec;
|
||
|
import javax.crypto.spec.PSource;
|
||
|
import javax.security.auth.x500.X500Principal;
|
||
|
import org.bouncycastle.pqc.jcajce.spec.McElieceCCA2KeyGenParameterSpec;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public final class TeR extends C15855jEc {
|
||
|
@Override // o.C15855jEc, o.zVr
|
||
|
public final /* bridge */ /* synthetic */ byte[] a(Key key) throws Exception {
|
||
|
return super.a(key);
|
||
|
}
|
||
|
|
||
|
@Override // o.C15855jEc, o.zVr
|
||
|
public final /* bridge */ /* synthetic */ Key c(byte[] bArr, String str) throws Exception {
|
||
|
return super.c(bArr, str);
|
||
|
}
|
||
|
|
||
|
public TeR(Context context) throws Exception {
|
||
|
super(context);
|
||
|
}
|
||
|
|
||
|
@Override // o.C15855jEc
|
||
|
protected final String c() {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(this.d.getPackageName());
|
||
|
sb.append(".FlutterSecureStoragePluginKeyOAEP");
|
||
|
return sb.toString();
|
||
|
}
|
||
|
|
||
|
@Override // o.C15855jEc
|
||
|
protected final AlgorithmParameterSpec c(Calendar calendar, Calendar calendar2) {
|
||
|
KeyGenParameterSpec.Builder builder = new KeyGenParameterSpec.Builder(this.a, 3);
|
||
|
StringBuilder sb = new StringBuilder("CN=");
|
||
|
sb.append(this.a);
|
||
|
return builder.setCertificateSubject(new X500Principal(sb.toString())).setDigests(McElieceCCA2KeyGenParameterSpec.SHA256).setBlockModes("ECB").setEncryptionPaddings("OAEPPadding").setCertificateSerialNumber(BigInteger.valueOf(1L)).setCertificateNotBefore(calendar.getTime()).setCertificateNotAfter(calendar2.getTime()).build();
|
||
|
}
|
||
|
|
||
|
@Override // o.C15855jEc
|
||
|
protected final Cipher a() throws Exception {
|
||
|
return Cipher.getInstance("RSA/ECB/OAEPPadding", "AndroidKeyStoreBCWorkaround");
|
||
|
}
|
||
|
|
||
|
@Override // o.C15855jEc
|
||
|
protected final AlgorithmParameterSpec d() {
|
||
|
return new OAEPParameterSpec(McElieceCCA2KeyGenParameterSpec.SHA256, "MGF1", MGF1ParameterSpec.SHA1, PSource.PSpecified.DEFAULT);
|
||
|
}
|
||
|
}
|