Class LogSign


  • public class LogSign
    extends Object
    This class is logging signature that generates with the MAC value for each log entry.
    • Constructor Detail

      • LogSign

        public LogSign​(String log)
        Constructor
        Parameters:
        log - A string representing the name of the logger.
    • Method Detail

      • readHeader

        public void readHeader​(String[] recordListHeader)
        Reads the header from the log file and interprets its contents. It finds out the position of the Signature and MAC fields.
        Parameters:
        recordListHeader - A string array that contains the header entries as strings.
      • sign

        public String sign()
                    throws Exception
        The actual sign method that creates the signature by taking the last generated MAC and the last Signature in the log file and then using that to create the next signature that is to be written to the file.
        Returns:
        A String repersentation of the actual byte array signature.
        Throws:
        Exception - if it fails to sign the mac value