package org.bouncycastle.crypto.macs;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class SipHash128 extends org.bouncycastle.crypto.macs.SipHash {
    public SipHash128() {
    }

    @Override // org.bouncycastle.crypto.macs.SipHash
    public long b() {
        throw new java.lang.UnsupportedOperationException("doFinal() is not supported");
    }

    @Override // org.bouncycastle.crypto.macs.SipHash, org.bouncycastle.crypto.Mac
    public int doFinal(byte[] bArr, int i) {
        long j = this.i;
        int i2 = this.j;
        this.i = ((j >>> ((7 - i2) << 3)) >>> 8) | ((((long) ((this.k << 3) + i2)) & 255) << 56);
        c();
        this.g ^= 238;
        a(this.b);
        long j2 = this.e;
        long j3 = this.f;
        long j4 = ((j2 ^ j3) ^ this.g) ^ this.h;
        this.f = j3 ^ 221;
        a(this.b);
        long j5 = ((this.e ^ this.f) ^ this.g) ^ this.h;
        reset();
        org.bouncycastle.util.Pack.H(j4, bArr, i);
        org.bouncycastle.util.Pack.H(j5, bArr, i + 8);
        return 16;
    }

    @Override // org.bouncycastle.crypto.macs.SipHash, org.bouncycastle.crypto.Mac
    public java.lang.String getAlgorithmName() {
        return "SipHash128-" + this.a + "-" + this.b;
    }

    @Override // org.bouncycastle.crypto.macs.SipHash, org.bouncycastle.crypto.Mac
    public int getMacSize() {
        return 16;
    }

    @Override // org.bouncycastle.crypto.macs.SipHash, org.bouncycastle.crypto.Mac
    public void reset() {
        super.reset();
        this.f ^= 238;
    }

    public SipHash128(int i, int i2) {
        super(i, i2);
    }
}
