Interface Layer

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void decStream​(java.io.InputStream newInputStream, java.io.OutputStream newOutputStream)
      Decodes an encrypted stream to either plain text or the next encoded layer.
      void encodeAndDecode​(java.io.InputStream newInputStream, java.io.OutputStream newOutputStream)
      Local encode Stream function which does the real thing for Random Layer.
      default void encStream​(java.io.InputStream newInputStream, java.io.OutputStream newOutputStream)
      Encodes either plain text or an encoded layer to the next encoding layer.
      void init​(java.lang.String data)
      Optional method for setting encryption or decryption parameters like keys or passwords.
      void setAction​(GlobalData.Action newAction)
      Property setter for action.
      void setInputStream​(java.io.InputStream newInputStream)
      Property setter for input stream.
      void setOutputStream​(java.io.OutputStream newOutputStream)
      property setter for output stream.
      void setRealLayerName​(java.lang.String newRealLayerName)
      Property setter for realLayerName.
    • Method Detail

      • init

        void init​(java.lang.String data)
        Optional method for setting encryption or decryption parameters like keys or passwords.
        Parameters:
        data - a String containing everything the layer needs to know
      • encodeAndDecode

        void encodeAndDecode​(java.io.InputStream newInputStream,
                             java.io.OutputStream newOutputStream)
                      throws JastacryException
        Local encode Stream function which does the real thing for Random Layer.
        Parameters:
        newInputStream - incoming data
        newOutputStream - outgoing data
        Throws:
        JastacryException - thrown on error
      • encStream

        default void encStream​(java.io.InputStream newInputStream,
                               java.io.OutputStream newOutputStream)
                        throws JastacryException
        Encodes either plain text or an encoded layer to the next encoding layer.
        Parameters:
        newInputStream - existing and opened input stream
        newOutputStream - existing and opened output stream
        Throws:
        JastacryException - if one of the streams fail
      • decStream

        default void decStream​(java.io.InputStream newInputStream,
                               java.io.OutputStream newOutputStream)
                        throws JastacryException
        Decodes an encrypted stream to either plain text or the next encoded layer.
        Parameters:
        newInputStream - existing and opened input stream
        newOutputStream - existing and opened output stream
        Throws:
        JastacryException - if one of the streams fail
      • setInputStream

        void setInputStream​(java.io.InputStream newInputStream)
        Property setter for input stream.
        Parameters:
        newInputStream - the new stream
      • setOutputStream

        void setOutputStream​(java.io.OutputStream newOutputStream)
        property setter for output stream.
        Parameters:
        newOutputStream - the new output stream
      • setAction

        void setAction​(GlobalData.Action newAction)
        Property setter for action.
        Parameters:
        newAction - the new action
      • setRealLayerName

        void setRealLayerName​(java.lang.String newRealLayerName)
        Property setter for realLayerName.
        Parameters:
        newRealLayerName - the new layer name