public class HashCombinator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HashCombinator.ca |
| Modifier and Type | Field and Description |
|---|---|
static BigInteger |
N_ADD |
static BigInteger |
N_MUL
Modulo Number
64-bit prime: 2^64 - 59 = 18446744073709551557
BigInteger("2").pow(64).subtract(new BigInteger("59"));
3072-bit prime: 2^3072 - 1103717
BigInteger("2").pow(3072).subtract(new BigInteger("1103717"));
2048-bit prime: 2^2048 - 11837
BigInteger("2").pow(2048).subtract(new BigInteger("11837"));
|
static BigInteger |
N_XOR |
| Constructor and Description |
|---|
HashCombinator() |
| Modifier and Type | Method and Description |
|---|---|
static BigInteger |
combine(BigInteger a,
BigInteger b,
HashCombinator.ca algorithm)
Combines two BigInteger hashes (requires no conversion from/to byte[])
|
static byte[] |
combine(byte[] hashA,
byte[] hashB,
HashCombinator.ca algorithm)
Combines two byte[] hashes
|
public static final BigInteger N_MUL
public static final BigInteger N_XOR
public static final BigInteger N_ADD
public static byte[] combine(byte[] hashA,
byte[] hashB,
HashCombinator.ca algorithm)
hashA - first hash value to combinehashB - second hash value to combinealgorithm - used combination algorithm (HashCombinator.ca)public static BigInteger combine(BigInteger a, BigInteger b, HashCombinator.ca algorithm)
a - first hash value to combineb - second hash value to combinealgorithm - used combination algorithm (HashCombinator.ca)Copyright © 2018. All rights reserved.