Class CRC32

  • All Implemented Interfaces:
    Checksum

    public final class CRC32
    extends java.lang.Object
    implements Checksum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int[] crc_table  
      private static int GF2_DIM  
      private int v  
    • Constructor Summary

      Constructors 
      Constructor Description
      CRC32()  
    • Field Detail

      • v

        private int v
      • crc_table

        private static int[] crc_table
    • Constructor Detail

      • CRC32

        public CRC32()
    • Method Detail

      • update

        public void update​(byte[] buf,
                           int index,
                           int len)
        Specified by:
        update in interface Checksum
      • reset

        public void reset()
        Specified by:
        reset in interface Checksum
      • reset

        public void reset​(long vv)
        Specified by:
        reset in interface Checksum
      • getValue

        public long getValue()
        Specified by:
        getValue in interface Checksum
      • combine

        static long combine​(long crc1,
                            long crc2,
                            long len2)
      • gf2_matrix_times

        private static long gf2_matrix_times​(long[] mat,
                                             long vec)
      • gf2_matrix_square

        static final void gf2_matrix_square​(long[] square,
                                            long[] mat)
      • getCRC32Table

        public static int[] getCRC32Table()