Class MacOutputStream

java.lang.Object
java.io.OutputStream
org.bouncycastle.jcajce.io.MacOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class MacOutputStream
extends OutputStream
  • Field Details

    • mac

      protected Mac mac
  • Constructor Details

    • MacOutputStream

      public MacOutputStream​(Mac mac)
  • Method Details

    • write

      public void write​(int b) throws IOException
      Description copied from class: OutputStream
      Writes a single byte to this stream. Only the least significant byte of the integer oneByte is written to the stream.
      Specified by:
      write in class OutputStream
      Parameters:
      b - the byte to be written.
      Throws:
      IOException - if an error occurs while writing to this stream.
    • write

      public void write​(byte[] b, int off, int len) throws IOException
      Description copied from class: OutputStream
      Writes count bytes from the byte array buffer starting at position offset to this stream.
      Overrides:
      write in class OutputStream
      Parameters:
      b - the buffer to be written.
      off - the start position in buffer from where to get bytes.
      len - the number of bytes from buffer to write to this stream.
      Throws:
      IOException - if an error occurs while writing to this stream.
    • getMac

      public byte[] getMac()