Better key generation example.