I've been looking at this problem for a long time. Can anyone help?

The equation x^2 - kx - 12 = 5 has only integer solutions for certain positive integers k. What is the sum of all such values of k?

The answer is 28.