(hash string)
| 25 | } |
| 26 | |
| 27 | func CheckHashErr(hash string) error { |
| 28 | if CheckHash(hash) { |
| 29 | return nil |
| 30 | } |
| 31 | return fmt.Errorf("check hash '%s' failed: %w", hash, ErrInvalidHash) |
| 32 | } |
| 33 | |
| 34 | func Hash(s string) string { |
| 35 | return stringutil.Md5(s) |
no test coverage detected