11 lines
318 B
Go
11 lines
318 B
Go
package store
|
|
|
|
import "testing"
|
|
|
|
func TestSecurityEventHashesAreStableAndSanitized(t *testing.T) {
|
|
first := shortSecurityEventHash("sensitive-subject")
|
|
if first != shortSecurityEventHash("sensitive-subject") || len(first) != 16 || first == "sensitive-subject" {
|
|
t.Fatalf("unsafe or unstable hash: %q", first)
|
|
}
|
|
}
|