Class FilemergeLayer

  • All Implemented Interfaces:
    java.lang.Runnable, Layer

    public class FilemergeLayer
    extends AbstractBasicLayer
    Mask every byte with data of a given file. If the file is smaller than the data it will be used again and again from the beginning.

    SPDX-License-Identifier: MIT

    Author:
    Kai Kretschmann
    • Field Detail

      • LAYERNAME

        public static final java.lang.String LAYERNAME
        static name of the layer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FilemergeLayer

        public FilemergeLayer()
        Constructor of FilemergeLayer.
    • Method Detail

      • init

        public final void init​(java.lang.String data)
        init function.
        Parameters:
        data - to initialise the file.
      • encodeAndDecode

        public final void encodeAndDecode​(java.io.InputStream inputStream,
                                          java.io.OutputStream outputStream)
                                   throws JastacryException
        merge Stream function.
        Parameters:
        inputStream - input stream
        outputStream - output stream
        Throws:
        JastacryException - in case of error
      • equals

        public boolean equals​(java.lang.Object o)
        Override equals method from object class.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - object to compare with
        Returns:
        true or false
      • hashCode

        public int hashCode()
        Override equals method from object class.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash of properties