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

46 lines
1.5 KiB
Java

package o;
import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class qtn extends AbstractC5396bsJ {
@Override // o.AbstractC5396bsJ
final int b() {
return 24;
}
@Override // o.AbstractC5396bsJ
public final /* bridge */ /* synthetic */ byte[] c(byte[] bArr, ByteBuffer byteBuffer) throws GeneralSecurityException {
return super.c(bArr, byteBuffer);
}
@Override // o.AbstractC5396bsJ
public final /* bridge */ /* synthetic */ void e(ByteBuffer byteBuffer, byte[] bArr, byte[] bArr2) throws GeneralSecurityException {
super.e(byteBuffer, bArr, bArr2);
}
public qtn(byte[] bArr, int i) throws InvalidKeyException {
super(bArr, i);
}
@Override // o.AbstractC5396bsJ
final int[] e(int[] iArr, int i) {
if (iArr.length != 6) {
throw new IllegalArgumentException(String.format("XChaCha20 uses 192-bit nonces, but got a %d-bit nonce", Integer.valueOf(iArr.length << 5)));
}
int[] iArr2 = new int[16];
C11262eby.e(r0, this.c);
int[] iArr3 = {0, 0, 0, 0, iArr3[12], iArr3[13], iArr3[14], iArr3[15], 0, 0, 0, 0, iArr[0], iArr[1], iArr[2], iArr[3]};
C11262eby.c(iArr3);
C11262eby.e(iArr2, Arrays.copyOf(iArr3, 8));
iArr2[12] = i;
iArr2[13] = 0;
iArr2[14] = iArr[4];
iArr2[15] = iArr[5];
return iArr2;
}
}