Class MacOutputStream

  • All Implemented Interfaces:
    , ,

    public class MacOutputStream
    extends 
    An output stream that wraps around a (message authentication code algorithm). This is currently used for symmetric (private) keys, but in theory could be used with assymetric (public/private) keys.
    Since:
    5.3.6
    • Constructor Summary

      Constructors 
      Constructor Description
       mac)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      getResult()
      Should only be invoked once, immediately after this stream is closed; it generates the final MAC result, and returns it as a Base64 encoded string.
      static MacOutputStream  key)  
      void write​(byte[] b)  
      void write​(byte[] b, int off, int len)  
      void write​(int b)  
      • Methods inherited from class java.io.

        , ,
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Constructor Detail

      • MacOutputStream

        public  mac)
    • Method Detail

      • streamFor

        public static  key)
                                         throws 
        Throws:
      • getResult

        public  getResult()
        Should only be invoked once, immediately after this stream is closed; it generates the final MAC result, and returns it as a Base64 encoded string.
        Returns:
        Base64 encoded MAC result
      • write

        public void write​(int b)
                   throws 
        Specified by:
         in class 
        Throws:
      • write

        public void write​(byte[] b)
                   throws 
        Overrides:
         in class 
        Throws:
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws 
        Overrides:
         in class 
        Throws: