package org.bouncycastle.crypto.digests;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class AsconXof128 extends org.bouncycastle.crypto.digests.AsconBaseDigest implements org.bouncycastle.crypto.Xof {
    private boolean i;

    @Override // org.bouncycastle.crypto.Xof
    public int b(byte[] bArr, int i, int i2) {
        int iC = c(bArr, i, i2);
        reset();
        return iC;
    }

    @Override // org.bouncycastle.crypto.Xof
    public int c(byte[] bArr, int i, int i2) {
        return a(bArr, i, i2);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected long d(byte[] bArr, int i) {
        return org.bouncycastle.util.Pack.v(bArr, i);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public /* bridge */ /* synthetic */ int doFinal(byte[] bArr, int i) {
        return super.doFinal(bArr, i);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected long e(byte[] bArr, int i, int i2) {
        return org.bouncycastle.util.Pack.w(bArr, i, i2);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected long g(int i) {
        return 1 << (i << 3);
    }

    @Override // org.bouncycastle.crypto.Digest
    public java.lang.String getAlgorithmName() {
        return "Ascon-XOF-128";
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.ExtendedDigest
    public int getByteLength() {
        return 8;
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public /* bridge */ /* synthetic */ int getDigestSize() {
        return super.getDigestSize();
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected void h() {
        this.i = true;
        super.h();
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected void j(long j, byte[] bArr, int i) {
        org.bouncycastle.util.Pack.H(j, bArr, i);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected void k(long j, byte[] bArr, int i, int i2) {
        org.bouncycastle.util.Pack.I(j, bArr, i, i2);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public void reset() {
        this.i = false;
        super.reset();
        this.a = -2701369817892108309L;
        this.b = -3711838248891385495L;
        this.c = -1778763697082575311L;
        this.d = 1072114354614917324L;
        this.e = -2282070310009238562L;
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public void update(byte b) {
        if (this.i) {
            throw new java.lang.IllegalArgumentException("attempt to absorb while squeezing");
        }
        super.update(b);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public void update(byte[] bArr, int i, int i2) {
        if (this.i) {
            throw new java.lang.IllegalArgumentException("attempt to absorb while squeezing");
        }
        super.update(bArr, i, i2);
    }
}
