// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.cms.jcajce;

import java.io.IOException;
import javax.crypto.Cipher;
import java.io.OutputStream;

class JceAADStream extends OutputStream
{
    private final byte[] SINGLE_BYTE;
    private Cipher cipher;
    
    JceAADStream(final Cipher cipher) {
        this.SINGLE_BYTE = new byte[1];
        this.cipher = cipher;
    }
    
    @Override
    public void write(final byte[] src, final int offset, final int len) throws IOException {
        this.cipher.updateAAD(src, offset, len);
    }
    
    @Override
    public void write(final int n) throws IOException {
        this.SINGLE_BYTE[0] = (byte)n;
        this.cipher.updateAAD(this.SINGLE_BYTE, 0, 1);
    }
}
