Skip to content

Commit

Permalink
Refactor: Rename method and parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfredKarrer committed Apr 6, 2019
1 parent 400fbbd commit 5cfa2c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public static byte[] getEncryptedMeritList(MeritList meritList, SecretKey secret
return Encryption.encrypt(bytes, secretKey);
}

public static byte[] getHashOfEncryptedProposalList(byte[] encryptedProposalList) {
return Hash.getSha256Ripemd160hash(encryptedProposalList);
public static byte[] getHashOfEncryptedVotes(byte[] encryptedVotes) {
return Hash.getSha256Ripemd160hash(encryptedVotes);
}

public static byte[] getOpReturnData(byte[] hash) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private byte[] getEncryptedVotes(BallotList sortedBallotList, SecretKey secretKe
private byte[] getOpReturnData(byte[] encryptedVotes) throws IOException {
// We cannot use hash of whole blindVote data because we create the merit signature with the blindVoteTxId
// So we use the encryptedVotes for the hash only.
final byte[] hash = BlindVoteConsensus.getHashOfEncryptedProposalList(encryptedVotes);
final byte[] hash = BlindVoteConsensus.getHashOfEncryptedVotes(encryptedVotes);
log.info("Sha256Ripemd160 hash of encryptedVotes: " + Utilities.bytesAsHexString(hash));
return BlindVoteConsensus.getOpReturnData(hash);
}
Expand Down

0 comments on commit 5cfa2c7

Please sign in to comment.