95 lines
3.5 KiB
Java
95 lines
3.5 KiB
Java
package o;
|
|
|
|
import com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException;
|
|
import java.security.GeneralSecurityException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import javax.crypto.Cipher;
|
|
import javax.crypto.NoSuchPaddingException;
|
|
import o.AbstractC16575pTO;
|
|
import o.NZO;
|
|
import o.RyZ;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class IfH extends AbstractC16575pTO<IFV> {
|
|
@Override // o.AbstractC16575pTO
|
|
public final /* synthetic */ void b(IFV ifv) throws GeneralSecurityException {
|
|
IFV ifv2 = ifv;
|
|
ifG.b(ifv2.version_);
|
|
ifG.e(ifv2.keyValue_.d());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public IfH() {
|
|
super(IFV.class, new AbstractC5281bqA<InterfaceC4280bVg, IFV>(InterfaceC4280bVg.class) { // from class: o.IfH.4
|
|
@Override // o.AbstractC5281bqA
|
|
public final /* synthetic */ InterfaceC4280bVg b(IFV ifv) throws GeneralSecurityException {
|
|
return new OxE(ifv.keyValue_.c());
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final NZO.Sts b() {
|
|
return NZO.Sts.SYMMETRIC;
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final AbstractC16575pTO.LWm<?, IFV> c() {
|
|
return new AbstractC16575pTO.LWm<ArM, IFV>(this, ArM.class) { // from class: o.IfH.1
|
|
private IfH e;
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ IFV a(ArM arM) throws GeneralSecurityException {
|
|
return IFV.b().c(jra.e(YTf.b(arM.keySize_))).d().h();
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ void d(ArM arM) throws GeneralSecurityException {
|
|
ifG.e(arM.keySize_);
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final Map<String, AbstractC16575pTO.LWm.RVV<ArM>> d() throws GeneralSecurityException {
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put("AES128_GCM_SIV", new AbstractC16575pTO.LWm.RVV(ArM.e().c(16).h(), RyZ.IeS.TINK));
|
|
hashMap.put("AES128_GCM_SIV_RAW", new AbstractC16575pTO.LWm.RVV(ArM.e().c(16).h(), RyZ.IeS.RAW));
|
|
hashMap.put("AES256_GCM_SIV", new AbstractC16575pTO.LWm.RVV(ArM.e().c(32).h(), RyZ.IeS.TINK));
|
|
hashMap.put("AES256_GCM_SIV_RAW", new AbstractC16575pTO.LWm.RVV(ArM.e().c(32).h(), RyZ.IeS.RAW));
|
|
return Collections.unmodifiableMap(hashMap);
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO.LWm
|
|
public final /* synthetic */ ArM e(jra jraVar) throws InvalidProtocolBufferException {
|
|
return ArM.d(jraVar, C1458aEp.c());
|
|
}
|
|
};
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static boolean e() {
|
|
try {
|
|
Cipher.getInstance("AES/GCM-SIV/NoPadding");
|
|
return true;
|
|
} catch (NoSuchAlgorithmException | NoSuchPaddingException unused) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final /* synthetic */ IFV b(jra jraVar) throws InvalidProtocolBufferException {
|
|
return IFV.e(jraVar, C1458aEp.c());
|
|
}
|
|
|
|
@Override // o.AbstractC16575pTO
|
|
public final String d() {
|
|
return "type.googleapis.com/google.crypto.tink.AesGcmSivKey";
|
|
}
|
|
}
|