DoubleHashB calculates hash(hash(b)) and returns the resulting bytes.
(b []byte)
| 63 | |
| 64 | // DoubleHashB calculates hash(hash(b)) and returns the resulting bytes. |
| 65 | func DoubleHashB(b []byte) []byte { |
| 66 | first := sha256.Sum256(b) |
| 67 | second := sha256.Sum256(first[:]) |
| 68 | return second[:] |
| 69 | } |
| 70 | |
| 71 | // DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a |
| 72 | // Hash. |
no outgoing calls