Compute fingerprint correctly

Daniel Dadap reported that the key fingerprint was being incorrectly
calculated, resulting in inconsistent values. Fix the check so it doesn't
check random memory.