String returns the Hash as the hexadecimal string of the byte-reversed hash.
()
| 44 | // String returns the Hash as the hexadecimal string of the byte-reversed |
| 45 | // hash. |
| 46 | func (h Hash) String() string { |
| 47 | for i := 0; i < HashSize/2; i++ { |
| 48 | h[i], h[HashSize-1-i] = h[HashSize-1-i], h[i] |
| 49 | } |
| 50 | return hex.EncodeToString(h[:]) |
| 51 | } |
| 52 | |
| 53 | // Short returns the hexadecimal string of the first `n` reversed byte(s). |
| 54 | func (h Hash) Short(n int) string { |
no outgoing calls