Class Crc32cHashFunction

  • All Implemented Interfaces:
    HashFunction

    final class Crc32cHashFunction
    extends AbstractHashFunction
    This class generates a CRC32C checksum, defined by RFC 3720, Section 12.1. The generator polynomial for this checksum is 0x11EDC6F41.
    • Constructor Detail

      • Crc32cHashFunction

        Crc32cHashFunction()
    • Method Detail

      • bits

        public int bits()
        Description copied from interface: HashFunction
        Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
      • newHasher

        public Hasher newHasher()
        Description copied from interface: HashFunction
        Begins a new hash code computation by returning an initialized, stateful Hasher instance that is ready to receive data. Example:
        
         HashFunction hf = Hashing.md5();
         HashCode hc = hf.newHasher()
             .putLong(id)
             .putBoolean(isActive)
             .hash();
         
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object