You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
313 B
17 lines
313 B
package util
|
|
|
|
import "testing"
|
|
|
|
func TestMd5Sum(t *testing.T) {
|
|
input := "don't hash passwords with md5"
|
|
|
|
have, err := Md5SumString(input)
|
|
if err != nil {
|
|
t.Fatal("expected err to be nil")
|
|
}
|
|
|
|
want := "dd1f7fdb3466c0d09c2e839d1f1530f8"
|
|
if have != want {
|
|
t.Fatalf("expected: %s got: %s", want, have)
|
|
}
|
|
}
|
|
|