@@ -0,0 +1,461 @@
+package org.bouncycastle.cms;%0A%0Aimport java.io.IOException;%0Aimport java.io.OutputStream;%0A%0Aimport javax.crypto.Mac;%0A%0Aclass MacOutputStream extends OutputStream%0A%7B%0A    private final Mac mac;%0A%0A    MacOutputStream(Mac mac)%0A    %7B%0A        this.mac = mac;%0A    %7D%0A%0A    public void write(byte%5B%5D b, int off, int len) throws IOException%0A    %7B%0A        mac.update(b, off, len);%0A    %7D%0A%0A    public void write(int b) throws IOException%0A    %7B%0A        mac.update((byte) b);%0A    %7D%0A%7D%0A

Add new class MacOutputStream