Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String calculateGroupHash(Set<String> digests) {
- BigInteger hash = BigInteger.valueOf(0);
- for (String entry : digests) {
- try {
- BigInteger digest = new BigInteger(Hex.decodeHex(entry.toCharArray()));
- hash = hash.xor(digest);
- } catch (DecoderException e) {
- e.printStackTrace();
- }
- }
- return Hex.encodeHexString(hash.toByteArray());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement