Package com.exonum.binding.common.hash
Class Hashing
- java.lang.Object
-
- com.exonum.binding.common.hash.Hashing
-
public final class Hashing extends java.lang.Object
Static methods to obtainHashFunction
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 Summary
Fields Modifier and Type Field Description static int
DEFAULT_HASH_SIZE_BITS
Size of a hash code in the default Exonum algorithm, in bits.static int
DEFAULT_HASH_SIZE_BYTES
Size of a hash code in the default Exonum algorithm.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HashFunction
defaultHashFunction()
Returns the default Exonum hash function: SHA-256.static HashFunction
sha256()
Returns a hash function implementing the SHA-256 algorithm (256 hash bits).static HashFunction
sha384()
Returns a hash function implementing the SHA-384 algorithm (384 hash bits).static HashFunction
sha512()
Returns a hash function implementing the SHA-512 algorithm (512 hash bits).
-
-
-
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).
-
defaultHashFunction
public static HashFunction defaultHashFunction()
Returns the default Exonum hash function: SHA-256.- See Also:
HashFunction.newHasher()
-
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).
-
-