generateKey changed