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.InvalidAlgorithmParameterException;
|
||
|
import java.security.InvalidKeyException;
|
||
|
import java.util.Collections;
|
||
|
import java.util.HashMap;
|
||
|
import java.util.Map;
|
||
|
import o.AbstractC16575pTO;
|
||
|
import o.NZO;
|
||
|
import o.RyZ;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class Jkh extends AbstractC16575pTO<KGe> {
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final /* synthetic */ void b(KGe kGe) throws GeneralSecurityException {
|
||
|
KGe kGe2 = kGe;
|
||
|
ifG.b(kGe2.version_);
|
||
|
if (kGe2.keyValue_.d() == 64) {
|
||
|
return;
|
||
|
}
|
||
|
StringBuilder sb = new StringBuilder("invalid key size: ");
|
||
|
sb.append(kGe2.keyValue_.d());
|
||
|
sb.append(". Valid keys must have 64 bytes.");
|
||
|
throw new InvalidKeyException(sb.toString());
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public Jkh() {
|
||
|
super(KGe.class, new AbstractC5281bqA<GHh, KGe>(GHh.class) { // from class: o.Jkh.5
|
||
|
@Override // o.AbstractC5281bqA
|
||
|
public final /* synthetic */ GHh b(KGe kGe) throws GeneralSecurityException {
|
||
|
return new rWh(kGe.keyValue_.c());
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final NZO.Sts b() {
|
||
|
return NZO.Sts.SYMMETRIC;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final AbstractC16575pTO.LWm<?, KGe> c() {
|
||
|
return new AbstractC16575pTO.LWm<C4084bPg, KGe>(this, C4084bPg.class) { // from class: o.Jkh.3
|
||
|
private Jkh b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ KGe a(C4084bPg c4084bPg) throws GeneralSecurityException {
|
||
|
return KGe.a().e(jra.e(YTf.b(c4084bPg.keySize_))).c().h();
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ void d(C4084bPg c4084bPg) throws GeneralSecurityException {
|
||
|
C4084bPg c4084bPg2 = c4084bPg;
|
||
|
if (c4084bPg2.keySize_ == 64) {
|
||
|
return;
|
||
|
}
|
||
|
StringBuilder sb = new StringBuilder("invalid key size: ");
|
||
|
sb.append(c4084bPg2.keySize_);
|
||
|
sb.append(". Valid keys must have 64 bytes.");
|
||
|
throw new InvalidAlgorithmParameterException(sb.toString());
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final Map<String, AbstractC16575pTO.LWm.RVV<C4084bPg>> d() throws GeneralSecurityException {
|
||
|
HashMap hashMap = new HashMap();
|
||
|
hashMap.put("AES256_SIV", new AbstractC16575pTO.LWm.RVV(C4084bPg.a().c().h(), RyZ.IeS.TINK));
|
||
|
hashMap.put("AES256_SIV_RAW", new AbstractC16575pTO.LWm.RVV(C4084bPg.a().c().h(), RyZ.IeS.RAW));
|
||
|
return Collections.unmodifiableMap(hashMap);
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO.LWm
|
||
|
public final /* synthetic */ C4084bPg e(jra jraVar) throws InvalidProtocolBufferException {
|
||
|
return C4084bPg.e(jraVar, C1458aEp.c());
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final /* synthetic */ KGe b(jra jraVar) throws InvalidProtocolBufferException {
|
||
|
return KGe.e(jraVar, C1458aEp.c());
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC16575pTO
|
||
|
public final String d() {
|
||
|
return "type.googleapis.com/google.crypto.tink.AesSivKey";
|
||
|
}
|
||
|
}
|