Interface Layer

    • Method Detail

      • init

        void init​(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​(InputStream newInputStream,
                             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​(InputStream newInputStream,
                               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​(InputStream newInputStream,
                               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​(InputStream newInputStream)
        Property setter for input stream.
        Parameters:
        newInputStream - the new stream
      • setOutputStream

        void setOutputStream​(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​(String newRealLayerName)
        Property setter for realLayerName.
        Parameters:
        newRealLayerName - the new layer name