mirror of
https://github.com/sparrowwallet/drongo.git
synced 2025-11-05 11:56:38 +00:00
Use Groestl hash in two places
This commit is contained in:
parent
479c28f966
commit
d802a58fe0
2 changed files with 2 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ public class DeterministicKey extends ECKey {
|
|||
int inputLength = input.length;
|
||||
byte[] checksummed = new byte[inputLength + 4];
|
||||
System.arraycopy(input, 0, checksummed, 0, inputLength);
|
||||
byte[] checksum = Sha256Hash.hashTwice(input);
|
||||
byte[] checksum = Groestl.digest(input);
|
||||
System.arraycopy(checksum, 0, checksummed, inputLength, 4);
|
||||
return checksummed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class Base58 {
|
|||
byte[] addressBytes = new byte[1 + payload.length + 4];
|
||||
addressBytes[0] = (byte) version;
|
||||
System.arraycopy(payload, 0, addressBytes, 1, payload.length);
|
||||
byte[] checksum = Sha256Hash.hashTwice(addressBytes, 0, payload.length + 1);
|
||||
byte[] checksum = Groestl.digest(addressBytes, 0, payload.length + 1);
|
||||
System.arraycopy(checksum, 0, addressBytes, payload.length + 1, 4);
|
||||
return Base58.encode(addressBytes);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue