DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a Hash.
(b []byte)
| 71 | // DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a |
| 72 | // Hash. |
| 73 | func DoubleHashH(b []byte) Hash { |
| 74 | first := sha256.Sum256(b) |
| 75 | return Hash(sha256.Sum256(first[:])) |
| 76 | } |
| 77 | |
| 78 | // THashB is a combination of blake2b-512 and SHA256 |
| 79 | // The cryptographic hash function BLAKE2 is an improved version of the |