Helper function to convert hash output to hex string for comparison
(hash [20]byte)
| 11 | |
| 12 | // Helper function to convert hash output to hex string for comparison |
| 13 | func toHexString(hash [20]byte) string { |
| 14 | return hex.EncodeToString(hash[:]) |
| 15 | } |
| 16 | |
| 17 | // Test vectors for SHA-1 (from RFC 3174 and other known sources) |
| 18 | var tests = []struct { |