what-the-bank/sources/o/C9716dpD.java

166 lines
6.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException;
import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import o.AbstractC16575pTO;
import o.C17103tuU;
import o.NZO;
import o.RRP;
import o.RyZ;
import o.uAf;
/* renamed from: o.dpD, reason: case insensitive filesystem */
/* loaded from: classes2.dex */
public final class C9716dpD extends AbstractC16575pTO<JpK> {
@Override // o.AbstractC16575pTO
public final /* synthetic */ void b(JpK jpK) throws GeneralSecurityException {
JpK jpK2 = jpK;
ifG.b(jpK2.version_);
new RRP();
IMF imf = jpK2.aesCtrKey_;
if (imf == null) {
imf = IMF.b();
}
ifG.b(imf.version_);
ifG.e(imf.keyValue_.d());
C15254gli c15254gli = imf.params_;
if (c15254gli == null) {
c15254gli = C15254gli.d();
}
if (c15254gli.ivSize_ >= 12 && c15254gli.ivSize_ <= 16) {
new C17103tuU();
C17247vGD c17247vGD = jpK2.hmacKey_;
if (c17247vGD == null) {
c17247vGD = C17247vGD.e();
}
C17103tuU.e(c17247vGD);
return;
}
throw new GeneralSecurityException("invalid IV size");
}
/* JADX INFO: Access modifiers changed from: package-private */
public C9716dpD() {
super(JpK.class, new AbstractC5281bqA<InterfaceC4280bVg, JpK>(InterfaceC4280bVg.class) { // from class: o.dpD.5
@Override // o.AbstractC5281bqA
public final /* synthetic */ InterfaceC4280bVg b(JpK jpK) throws GeneralSecurityException {
JpK jpK2 = jpK;
RRP rrp = new RRP();
IMF imf = jpK2.aesCtrKey_;
if (imf == null) {
imf = IMF.b();
}
InterfaceC13537fcG interfaceC13537fcG = (InterfaceC13537fcG) rrp.c(imf, InterfaceC13537fcG.class);
C17103tuU c17103tuU = new C17103tuU();
C17247vGD c17247vGD = jpK2.hmacKey_;
if (c17247vGD == null) {
c17247vGD = C17247vGD.e();
}
InterfaceC17126uCH interfaceC17126uCH = (InterfaceC17126uCH) c17103tuU.c(c17247vGD, InterfaceC17126uCH.class);
C17247vGD c17247vGD2 = jpK2.hmacKey_;
if (c17247vGD2 == null) {
c17247vGD2 = C17247vGD.e();
}
C15809ilo c15809ilo = c17247vGD2.params_;
if (c15809ilo == null) {
c15809ilo = C15809ilo.e();
}
return new nYK(interfaceC13537fcG, interfaceC17126uCH, c15809ilo.tagSize_);
}
});
}
@Override // o.AbstractC16575pTO
public final NZO.Sts b() {
return NZO.Sts.SYMMETRIC;
}
@Override // o.AbstractC16575pTO
public final AbstractC16575pTO.LWm<?, JpK> c() {
return new AbstractC16575pTO.LWm<IcU, JpK>(this, IcU.class) { // from class: o.dpD.2
private C9716dpD b;
{
this.b = this;
}
@Override // o.AbstractC16575pTO.LWm
public final /* synthetic */ JpK a(IcU icU) throws GeneralSecurityException {
IcU icU2 = icU;
RRP.AnonymousClass2 anonymousClass2 = new RRP.AnonymousClass2(new RRP(), gxo.class);
gxo gxoVar = icU2.aesCtrKeyFormat_;
if (gxoVar == null) {
gxoVar = gxo.b();
}
IMF a = anonymousClass2.a(gxoVar);
C17103tuU.AnonymousClass5 anonymousClass5 = new C17103tuU.AnonymousClass5(new C17103tuU(), kUb.class);
kUb kub = icU2.hmacKeyFormat_;
if (kub == null) {
kub = kUb.e();
}
return JpK.c().b(a).a(anonymousClass5.a(kub)).a().h();
}
@Override // o.AbstractC16575pTO.LWm
public final /* synthetic */ void d(IcU icU) throws GeneralSecurityException {
IcU icU2 = icU;
RRP.AnonymousClass2 anonymousClass2 = new RRP.AnonymousClass2(new RRP(), gxo.class);
gxo gxoVar = icU2.aesCtrKeyFormat_;
if (gxoVar == null) {
gxoVar = gxo.b();
}
anonymousClass2.d(gxoVar);
C17103tuU.AnonymousClass5 anonymousClass5 = new C17103tuU.AnonymousClass5(new C17103tuU(), kUb.class);
kUb kub = icU2.hmacKeyFormat_;
if (kub == null) {
kub = kUb.e();
}
anonymousClass5.d(kub);
gxo gxoVar2 = icU2.aesCtrKeyFormat_;
if (gxoVar2 == null) {
gxoVar2 = gxo.b();
}
ifG.e(gxoVar2.keySize_);
}
@Override // o.AbstractC16575pTO.LWm
public final Map<String, AbstractC16575pTO.LWm.RVV<IcU>> d() throws GeneralSecurityException {
HashMap hashMap = new HashMap();
hashMap.put("AES128_CTR_HMAC_SHA256", C9716dpD.c(16, 16, EHL.SHA256, RyZ.IeS.TINK));
hashMap.put("AES128_CTR_HMAC_SHA256_RAW", C9716dpD.c(16, 16, EHL.SHA256, RyZ.IeS.RAW));
hashMap.put("AES256_CTR_HMAC_SHA256", C9716dpD.c(32, 32, EHL.SHA256, RyZ.IeS.TINK));
hashMap.put("AES256_CTR_HMAC_SHA256_RAW", C9716dpD.c(32, 32, EHL.SHA256, RyZ.IeS.RAW));
return Collections.unmodifiableMap(hashMap);
}
@Override // o.AbstractC16575pTO.LWm
public final /* synthetic */ IcU e(jra jraVar) throws InvalidProtocolBufferException {
return IcU.b(jraVar, C1458aEp.c());
}
};
}
@Override // o.AbstractC16575pTO
public final uAf.RVV a() {
return uAf.RVV.ALGORITHM_REQUIRES_BORINGCRYPTO;
}
static /* synthetic */ AbstractC16575pTO.LWm.RVV c(int i, int i2, EHL ehl, RyZ.IeS ieS) {
gxo h = gxo.c().b(C15254gli.e().c().h()).d(i).h();
return new AbstractC16575pTO.LWm.RVV(IcU.d().a(h).c(kUb.c().b(C15809ilo.a().d(ehl).d(i2).h()).e(32).h()).h(), ieS);
}
@Override // o.AbstractC16575pTO
public final /* synthetic */ JpK b(jra jraVar) throws InvalidProtocolBufferException {
return JpK.b(jraVar, C1458aEp.c());
}
@Override // o.AbstractC16575pTO
public final String d() {
return "type.googleapis.com/google.crypto.tink.AesCtrHmacAeadKey";
}
}