Class ReverseLayer

  • All Implemented Interfaces:
    Runnable, Layer

    public class ReverseLayer
    extends AbstractBasicLayer
    Reverse every bits per byte. 0101 gives 1010 i.e.

    SPDX-License-Identifier: MIT

    Author:
    Kai Kretschmann
    • Constructor Detail

      • ReverseLayer

        public ReverseLayer()
        Constructor of XorLayer.
    • Method Detail

      • init

        public final void init​(String data)
        init function.
        Parameters:
        data - to initialize the offset value.
      • encodeAndDecode

        public final void encodeAndDecode​(InputStream inputStream,
                                          OutputStream outputStream)
                                   throws JastacryException
        Local encode Stream function which does the real thing for Reverse Layer.
        Parameters:
        inputStream - input data stream
        outputStream - output data stream
        Throws:
        JastacryException - in case of error
      • equals

        public boolean equals​(Object o)
        Override equals method from object class.
        Overrides:
        equals in class 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 Object
        Returns:
        hash of properties