Class Hashing


  • public final class Hashing
    extends Object
    Static methods to obtain HashFunction instances, and other static hashing-related utilities.

    A comparison of the various hash functions can be found here.

    Since:
    11.0
    Author:
    Kevin Bourrillion, Dimitris Andreou, Kurt Alfred Kluever
    • Field Detail

      • DEFAULT_HASH_SIZE_BYTES

        public static final int DEFAULT_HASH_SIZE_BYTES
        Size of a hash code in the default Exonum algorithm.
        See Also:
        Constant Field Values
      • DEFAULT_HASH_SIZE_BITS

        public static final int DEFAULT_HASH_SIZE_BITS
        Size of a hash code in the default Exonum algorithm, in bits.
        See Also:
        Constant Field Values
    • Method Detail

      • sha256

        public static HashFunction sha256()
        Returns a hash function implementing the SHA-256 algorithm (256 hash bits).
      • sha384

        public static HashFunction sha384()
        Returns a hash function implementing the SHA-384 algorithm (384 hash bits).
        Since:
        19.0
      • sha512

        public static HashFunction sha512()
        Returns a hash function implementing the SHA-512 algorithm (512 hash bits).