package org.bouncycastle.crypto.digests;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class AsconXof extends org.bouncycastle.crypto.digests.AsconBaseDigest implements org.bouncycastle.crypto.Xof {
    org.bouncycastle.crypto.digests.AsconXof.AsconParameters i;
    private final java.lang.String j;
    private boolean k;

    /* JADX INFO: renamed from: org.bouncycastle.crypto.digests.AsconXof$1, reason: invalid class name */
    static /* synthetic */ class AnonymousClass1 {
        static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[org.bouncycastle.crypto.digests.AsconXof.AsconParameters.values().length];
            a = iArr;
            try {
                iArr[org.bouncycastle.crypto.digests.AsconXof.AsconParameters.AsconXof.ordinal()] = 1;
            } catch (java.lang.NoSuchFieldError unused) {
            }
            try {
                a[org.bouncycastle.crypto.digests.AsconXof.AsconParameters.AsconXofA.ordinal()] = 2;
            } catch (java.lang.NoSuchFieldError unused2) {
            }
        }
    }

    public enum AsconParameters {
        AsconXof,
        AsconXofA
    }

    @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.c(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.d(bArr, i, i2);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected long g(int i) {
        return 128 << (56 - (i << 3));
    }

    @Override // org.bouncycastle.crypto.Digest
    public java.lang.String getAlgorithmName() {
        return this.j;
    }

    @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.k = true;
        super.h();
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected void j(long j, byte[] bArr, int i) {
        org.bouncycastle.util.Pack.C(j, bArr, i);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest
    protected void k(long j, byte[] bArr, int i, int i2) {
        org.bouncycastle.util.Pack.D(j, bArr, i, i2);
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public void reset() {
        long j;
        super.reset();
        this.k = false;
        int i = org.bouncycastle.crypto.digests.AsconXof.AnonymousClass1.a[this.i.ordinal()];
        if (i == 1) {
            this.a = -5368810569253202922L;
            this.b = 3121280575360345120L;
            this.c = 7395939140700676632L;
            this.d = 6533890155656471820L;
            j = 5710016986865767350L;
        } else {
            if (i != 2) {
                return;
            }
            this.a = 4940560291654768690L;
            this.b = -3635129828240960206L;
            this.c = -597534922722107095L;
            this.d = 2623493988082852443L;
            j = -6283826724160825537L;
        }
        this.e = j;
    }

    @Override // org.bouncycastle.crypto.digests.AsconBaseDigest, org.bouncycastle.crypto.Digest
    public void update(byte b) {
        if (this.k) {
            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.k) {
            throw new java.lang.IllegalArgumentException("attempt to absorb while squeezing");
        }
        super.update(bArr, i, i2);
    }
}
