package o; import java.nio.ByteBuffer; import java.security.GeneralSecurityException; import o.Yzk; /* loaded from: classes2.dex */ public final class sPU { public static final byte[] b = new byte[0]; /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.sPU$5, reason: invalid class name */ /* loaded from: classes2.dex */ public static /* synthetic */ class AnonymousClass5 { static final int[] b; static { int[] iArr = new int[Umh.values().length]; b = iArr; try { iArr[Umh.LEGACY.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { b[Umh.CRUNCHY.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { b[Umh.TINK.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { b[Umh.RAW.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } } } public static byte[] a(Yzk.IeS ieS) throws GeneralSecurityException { int[] iArr = AnonymousClass5.b; Umh b2 = Umh.b(ieS.outputPrefixType_); if (b2 == null) { b2 = Umh.UNRECOGNIZED; } int i = iArr[b2.ordinal()]; if (i == 1 || i == 2) { return ByteBuffer.allocate(5).put((byte) 0).putInt(ieS.keyId_).array(); } if (i == 3) { return ByteBuffer.allocate(5).put((byte) 1).putInt(ieS.keyId_).array(); } if (i == 4) { return b; } throw new GeneralSecurityException("unknown output prefix type"); } }