Skip to content

Commit

Permalink
Merge pull request #2665 from ManfredKarrer/use-crypt-hash-at-role
Browse files Browse the repository at this point in the history
Use cryptographic hash from protobuffer serialized data instead of hashCode
  • Loading branch information
ripcurlx authored Apr 8, 2019
2 parents 2846b18 + 2b15bd2 commit f4c65c4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

import io.bisq.generated.protobuffer.PB;

import java.math.BigInteger;

import java.util.Objects;
import java.util.UUID;

Expand Down Expand Up @@ -104,8 +102,7 @@ public static Role fromProto(PB.Role proto) {

@Override
public byte[] getHash() {
// We use only the immutable data as input for hash
byte[] bytes = BigInteger.valueOf(hashCode()).toByteArray();
byte[] bytes = toProtoMessage().toByteArray();
return Hash.getSha256Ripemd160hash(bytes);
}

Expand Down

0 comments on commit f4c65c4

Please sign in to comment.