what-the-bank/sources/o/EwB.java

32 lines
1010 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
/* loaded from: classes2.dex */
public final class EwB implements InterfaceC17126uCH {
private final InterfaceC16851roi a;
private final int b;
public EwB(InterfaceC16851roi interfaceC16851roi, int i) throws GeneralSecurityException {
this.a = interfaceC16851roi;
this.b = i;
if (i < 10) {
throw new InvalidAlgorithmParameterException("tag size too small, need at least 10 bytes");
}
interfaceC16851roi.c(new byte[0], i);
}
@Override // o.InterfaceC17126uCH
public final byte[] d(byte[] bArr) throws GeneralSecurityException {
return this.a.c(bArr, this.b);
}
@Override // o.InterfaceC17126uCH
public final void a(byte[] bArr, byte[] bArr2) throws GeneralSecurityException {
if (!vil.d(d(bArr2), bArr)) {
throw new GeneralSecurityException("invalid MAC");
}
}
}