Replace `generateRandomKey` with `generateRandomString`.