package org.bouncycastle.crypto.digests;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class SHA384Digest extends org.bouncycastle.crypto.digests.LongDigest {
    public SHA384Digest() {
        this(org.bouncycastle.crypto.CryptoServicePurpose.ANY);
    }

    public org.bouncycastle.util.Memoable a() {
        return new org.bouncycastle.crypto.digests.SHA384Digest(this);
    }

    public void d(org.bouncycastle.util.Memoable memoable) {
        super.l((org.bouncycastle.crypto.digests.SHA384Digest) memoable);
    }

    @Override // org.bouncycastle.crypto.Digest
    public int doFinal(byte[] bArr, int i) {
        m();
        org.bouncycastle.util.Pack.C(this.f, bArr, i);
        org.bouncycastle.util.Pack.C(this.g, bArr, i + 8);
        org.bouncycastle.util.Pack.C(this.h, bArr, i + 16);
        org.bouncycastle.util.Pack.C(this.i, bArr, i + 24);
        org.bouncycastle.util.Pack.C(this.j, bArr, i + 32);
        org.bouncycastle.util.Pack.C(this.k, bArr, i + 40);
        reset();
        return 48;
    }

    @Override // org.bouncycastle.crypto.Digest
    public java.lang.String getAlgorithmName() {
        return "SHA-384";
    }

    @Override // org.bouncycastle.crypto.Digest
    public int getDigestSize() {
        return 48;
    }

    protected org.bouncycastle.crypto.CryptoServiceProperties q() {
        return org.bouncycastle.crypto.digests.Utils.a(this, 256, this.a);
    }

    @Override // org.bouncycastle.crypto.digests.LongDigest, org.bouncycastle.crypto.Digest
    public void reset() {
        super.reset();
        this.f = -3766243637369397544L;
        this.g = 7105036623409894663L;
        this.h = -7973340178411365097L;
        this.i = 1526699215303891257L;
        this.j = 7436329637833083697L;
        this.k = -8163818279084223215L;
        this.l = -2662702644619276377L;
        this.m = 5167115440072839076L;
    }

    public SHA384Digest(org.bouncycastle.crypto.CryptoServicePurpose cryptoServicePurpose) {
        super(cryptoServicePurpose);
        org.bouncycastle.crypto.CryptoServicesRegistrar.a(q());
        reset();
    }

    public SHA384Digest(org.bouncycastle.crypto.digests.SHA384Digest sHA384Digest) {
        super(sHA384Digest);
        org.bouncycastle.crypto.CryptoServicesRegistrar.a(q());
    }
}
