126 lines
4.5 KiB
Java
126 lines
4.5 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.cDH;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class LmQ extends AbstractC16575pTO<cDH> {
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final /* synthetic */ void b(cDH cdh) throws GeneralSecurityException {
|
||
|
cDH cdh2 = cdh;
|
||
|
ifG.b(cdh2.version_);
|
||
|
ifG.e(cdh2.keyValue_.d());
|
||
|
psh pshVar = cdh2.params_;
|
||
|
if (pshVar == null) {
|
||
|
pshVar = psh.c();
|
||
|
}
|
||
|
if (pshVar.ivSize_ != 12) {
|
||
|
psh pshVar2 = cdh2.params_;
|
||
|
if (pshVar2 == null) {
|
||
|
pshVar2 = psh.c();
|
||
|
}
|
||
|
if (pshVar2.ivSize_ != 16) {
|
||
|
throw new GeneralSecurityException("invalid IV size; acceptable values have 12 or 16 bytes");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public LmQ() {
|
||
|
super(cDH.class, new AbstractC5281bqA<InterfaceC4280bVg, cDH>(InterfaceC4280bVg.class) { // from class: o.LmQ.5
|
||
|
@Override // o.AbstractC5281bqA
|
||
|
public final /* synthetic */ InterfaceC4280bVg b(cDH cdh) throws GeneralSecurityException {
|
||
|
cDH cdh2 = cdh;
|
||
|
byte[] c = cdh2.keyValue_.c();
|
||
|
psh pshVar = cdh2.params_;
|
||
|
if (pshVar == null) {
|
||
|
pshVar = psh.c();
|
||
|
}
|
||
|
return new IYa(c, pshVar.ivSize_);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final NZO.Sts b() {
|
||
|
return NZO.Sts.SYMMETRIC;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final AbstractC16575pTO.LWm<?, cDH> c() {
|
||
|
return new AbstractC16575pTO.LWm<C4340bXV, cDH>(this, C4340bXV.class) { // from class: o.LmQ.1
|
||
|
private LmQ b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ cDH a(C4340bXV c4340bXV) throws GeneralSecurityException {
|
||
|
C4340bXV c4340bXV2 = c4340bXV;
|
||
|
cDH.Sts e = cDH.a().e(jra.e(YTf.b(c4340bXV2.keySize_)));
|
||
|
psh pshVar = c4340bXV2.params_;
|
||
|
if (pshVar == null) {
|
||
|
pshVar = psh.c();
|
||
|
}
|
||
|
return e.a(pshVar).a().h();
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ void d(C4340bXV c4340bXV) throws GeneralSecurityException {
|
||
|
C4340bXV c4340bXV2 = c4340bXV;
|
||
|
ifG.e(c4340bXV2.keySize_);
|
||
|
psh pshVar = c4340bXV2.params_;
|
||
|
if (pshVar == null) {
|
||
|
pshVar = psh.c();
|
||
|
}
|
||
|
if (pshVar.ivSize_ != 12) {
|
||
|
psh pshVar2 = c4340bXV2.params_;
|
||
|
if (pshVar2 == null) {
|
||
|
pshVar2 = psh.c();
|
||
|
}
|
||
|
if (pshVar2.ivSize_ != 16) {
|
||
|
throw new GeneralSecurityException("invalid IV size; acceptable values have 12 or 16 bytes");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final Map<String, AbstractC16575pTO.LWm.RVV<C4340bXV>> d() throws GeneralSecurityException {
|
||
|
HashMap hashMap = new HashMap();
|
||
|
hashMap.put("AES128_EAX", LmQ.c(16, RyZ.IeS.TINK));
|
||
|
hashMap.put("AES128_EAX_RAW", LmQ.c(16, RyZ.IeS.RAW));
|
||
|
hashMap.put("AES256_EAX", LmQ.c(32, RyZ.IeS.TINK));
|
||
|
hashMap.put("AES256_EAX_RAW", LmQ.c(32, RyZ.IeS.RAW));
|
||
|
return Collections.unmodifiableMap(hashMap);
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ C4340bXV e(jra jraVar) throws InvalidProtocolBufferException {
|
||
|
return C4340bXV.d(jraVar, C1458aEp.c());
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
static /* synthetic */ AbstractC16575pTO.LWm.RVV c(int i, RyZ.IeS ieS) {
|
||
|
return new AbstractC16575pTO.LWm.RVV(C4340bXV.e().d(i).c(psh.b().a().h()).h(), ieS);
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final /* synthetic */ cDH b(jra jraVar) throws InvalidProtocolBufferException {
|
||
|
return cDH.e(jraVar, C1458aEp.c());
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final String d() {
|
||
|
return "type.googleapis.com/google.crypto.tink.AesEaxKey";
|
||
|
}
|
||
|
}
|