Revert change to KeyGenerator that was never supposed to end up on this branch.