forked from TrueCloudLab/neoneo-go
hash: remove useless no-op decoding
It changes nothing here.
This commit is contained in:
parent
710520a999
commit
7e83078d13
1 changed files with 1 additions and 4 deletions
|
@ -37,13 +37,10 @@ func RipeMD160(data []byte) util.Uint160 {
|
||||||
// Hash160 performs sha256 and then ripemd160
|
// Hash160 performs sha256 and then ripemd160
|
||||||
// on the given data.
|
// on the given data.
|
||||||
func Hash160(data []byte) util.Uint160 {
|
func Hash160(data []byte) util.Uint160 {
|
||||||
var hash util.Uint160
|
|
||||||
|
|
||||||
h1 := Sha256(data)
|
h1 := Sha256(data)
|
||||||
h2 := RipeMD160(h1.BytesBE())
|
h2 := RipeMD160(h1.BytesBE())
|
||||||
hash, _ = util.Uint160DecodeBytesBE(h2.BytesBE())
|
|
||||||
|
|
||||||
return hash
|
return h2
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checksum returns the checksum for a given piece of data
|
// Checksum returns the checksum for a given piece of data
|
||||||
|
|
Loading…
Reference in a new issue