Class AbstractLongCrc

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int bitWidth  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractLongCrc​(java.lang.String algorithm, int bitWidth, long initial, long xorOut)  
    • Field Detail

      • bitWidth

        protected final int bitWidth
    • Constructor Detail

      • AbstractLongCrc

        AbstractLongCrc​(java.lang.String algorithm,
                        int bitWidth,
                        long initial,
                        long xorOut)
    • Method Detail

      • algorithm

        public java.lang.String algorithm()
        Description copied from interface: Hash
        Returns the canonical name of this hash algorithm.
        Returns:
        the name of this hash algorithm
      • length

        public int length()
        Description copied from interface: Hash
        Returns the length in bytes of the output of this hash function.
        Returns:
        the hash length in bytes
      • resumeUnchecked

        protected long resumeUnchecked​(long current,
                                       byte[] input,
                                       int index,
                                       int length)
        Description copied from class: AbstractIncrementalLongHash
        Evaluates this hash function as if the given range of the given input array were appended to the previously hashed input. The index and length parameters have already been validated.
        Specified by:
        resumeUnchecked in class AbstractIncrementalLongHash
        Parameters:
        current - the hash output for input hashed so far
        input - the input array
        index - the starting index of the first input byte
        length - the length of the input range
        Returns:
        the output of the hash function for the concatenated input
      • resumeRaw

        protected abstract long resumeRaw​(long crc,
                                          byte[] input,
                                          int index,
                                          int length)
      • reflect

        protected final long reflect​(long value)