Use id to generate key