package org.bouncycastle.cms;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
class CMSEnvelopedHelper {

    static class CMSAuthEnveSecureReadable extends org.bouncycastle.cms.CMSEnvelopedHelper.CMSDefaultSecureReadable {
    }

    static abstract class CMSDefaultSecureReadable implements org.bouncycastle.cms.CMSSecureReadable {
    }

    static class CMSDigestAuthenticatedSecureReadable extends org.bouncycastle.cms.CMSEnvelopedHelper.CMSDefaultSecureReadable {
        private org.bouncycastle.operator.DigestCalculator a;

        /* JADX INFO: renamed from: org.bouncycastle.cms.CMSEnvelopedHelper$CMSDigestAuthenticatedSecureReadable$1, reason: invalid class name */
        class AnonymousClass1 extends java.io.FilterInputStream {
            final /* synthetic */ org.bouncycastle.cms.CMSEnvelopedHelper.CMSDigestAuthenticatedSecureReadable a;

            @Override // java.io.FilterInputStream, java.io.InputStream
            public int read() throws java.io.IOException {
                int i = ((java.io.FilterInputStream) this).in.read();
                if (i >= 0) {
                    this.a.a.getOutputStream().write(i);
                }
                return i;
            }

            @Override // java.io.FilterInputStream, java.io.InputStream
            public int read(byte[] bArr, int i, int i2) throws java.io.IOException {
                int i3 = ((java.io.FilterInputStream) this).in.read(bArr, i, i2);
                if (i3 >= 0) {
                    this.a.a.getOutputStream().write(bArr, i, i3);
                }
                return i3;
            }
        }
    }
}
