120 lines
4.3 KiB
Java
120 lines
4.3 KiB
Java
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.NZO;
|
|
import o.RyZ;
|
|
import o.uLy;
|
|
|
|
/* renamed from: o.qSl, reason: case insensitive filesystem */
|
|
/* loaded from: classes2.dex */
|
|
public final class C16697qSl extends AbstractC16575pTO<uLy> {
|
|
@Override // o.AbstractC16575pTO
|
|
public final /* synthetic */ void b(uLy uly) throws GeneralSecurityException {
|
|
uLy uly2 = uly;
|
|
ifG.b(uly2.version_);
|
|
if (uly2.keyValue_.d() == 32) {
|
|
XTy xTy = uly2.params_;
|
|
if (xTy == null) {
|
|
xTy = XTy.a();
|
|
}
|
|
d(xTy);
|
|
return;
|
|
}
|
|
throw new GeneralSecurityException("AesCmacKey size wrong, must be 32 bytes");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public C16697qSl() {
|
|
super(uLy.class, new AbstractC5281bqA<InterfaceC17126uCH, uLy>(InterfaceC17126uCH.class) { // from class: o.qSl.2
|
|
@Override // o.AbstractC5281bqA
|
|
public final /* synthetic */ InterfaceC17126uCH b(uLy uly) throws GeneralSecurityException {
|
|
uLy uly2 = uly;
|
|
C17618yNf c17618yNf = new C17618yNf(uly2.keyValue_.c());
|
|
XTy xTy = uly2.params_;
|
|
if (xTy == null) {
|
|
xTy = XTy.a();
|
|
}
|
|
return new EwB(c17618yNf, xTy.tagSize_);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final NZO.Sts b() {
|
|
return NZO.Sts.SYMMETRIC;
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final AbstractC16575pTO.LWm<?, uLy> c() {
|
|
return new AbstractC16575pTO.LWm<Gcd, uLy>(this, Gcd.class) { // from class: o.qSl.3
|
|
private C16697qSl d;
|
|
|
|
{
|
|
this.d = this;
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ uLy a(Gcd gcd) throws GeneralSecurityException {
|
|
Gcd gcd2 = gcd;
|
|
uLy.HBt c = uLy.e().d().c(jra.e(YTf.b(gcd2.keySize_)));
|
|
XTy xTy = gcd2.params_;
|
|
if (xTy == null) {
|
|
xTy = XTy.a();
|
|
}
|
|
return c.c(xTy).h();
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ void d(Gcd gcd) throws GeneralSecurityException {
|
|
Gcd gcd2 = gcd;
|
|
XTy xTy = gcd2.params_;
|
|
if (xTy == null) {
|
|
xTy = XTy.a();
|
|
}
|
|
C16697qSl.d(xTy);
|
|
if (gcd2.keySize_ != 32) {
|
|
throw new GeneralSecurityException("AesCmacKey size wrong, must be 32 bytes");
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final Map<String, AbstractC16575pTO.LWm.RVV<Gcd>> d() throws GeneralSecurityException {
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put("AES_CMAC", new AbstractC16575pTO.LWm.RVV(Gcd.c().c().b(XTy.b().e().h()).h(), RyZ.IeS.TINK));
|
|
hashMap.put("AES256_CMAC", new AbstractC16575pTO.LWm.RVV(Gcd.c().c().b(XTy.b().e().h()).h(), RyZ.IeS.TINK));
|
|
hashMap.put("AES256_CMAC_RAW", new AbstractC16575pTO.LWm.RVV(Gcd.c().c().b(XTy.b().e().h()).h(), RyZ.IeS.RAW));
|
|
return Collections.unmodifiableMap(hashMap);
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ Gcd e(jra jraVar) throws InvalidProtocolBufferException {
|
|
return Gcd.b(jraVar, C1458aEp.c());
|
|
}
|
|
};
|
|
}
|
|
|
|
static void d(XTy xTy) throws GeneralSecurityException {
|
|
if (xTy.tagSize_ < 10) {
|
|
throw new GeneralSecurityException("tag size too short");
|
|
}
|
|
if (xTy.tagSize_ > 16) {
|
|
throw new GeneralSecurityException("tag size too long");
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final /* synthetic */ uLy b(jra jraVar) throws InvalidProtocolBufferException {
|
|
return uLy.a(jraVar, C1458aEp.c());
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final String d() {
|
|
return "type.googleapis.com/google.crypto.tink.AesCmacKey";
|
|
}
|
|
}
|