package org.bouncycastle.cert.crmf;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class PKMACBuilder implements org.bouncycastle.operator.PBEMacCalculatorProvider {
    private org.bouncycastle.cert.crmf.PKMACValuesCalculator a;

    /* JADX INFO: renamed from: org.bouncycastle.cert.crmf.PKMACBuilder$1, reason: invalid class name */
    class AnonymousClass1 implements org.bouncycastle.operator.MacCalculator {
        java.io.ByteArrayOutputStream a;
        final /* synthetic */ org.bouncycastle.asn1.cmp.PBMParameter b;
        final /* synthetic */ byte[] c;
        final /* synthetic */ org.bouncycastle.cert.crmf.PKMACBuilder d;

        public org.bouncycastle.asn1.x509.AlgorithmIdentifier a() {
            return new org.bouncycastle.asn1.x509.AlgorithmIdentifier(org.bouncycastle.asn1.cmp.CMPObjectIdentifiers.a, this.b);
        }

        /* JADX INFO: Thrown type has an unknown type hierarchy: org.bouncycastle.operator.RuntimeOperatorException */
        public byte[] b() throws org.bouncycastle.operator.RuntimeOperatorException {
            try {
                return this.d.a.a(this.c, this.a.toByteArray());
            } catch (org.bouncycastle.cert.crmf.CRMFException e) {
                throw new org.bouncycastle.operator.RuntimeOperatorException("exception calculating mac: " + e.getMessage(), e);
            }
        }

        public java.io.OutputStream getOutputStream() {
            return this.a;
        }
    }
}
