Can someone tell me how it is possible to implement the generation of unique erc20 addresses for registered users?
So, reading the comments it seems you are running an exchange and you want to generate accounts (addresses included) for your users so that they can deposit funds, while you control the accounts (you have the private keys), and not them. You can do that using an HD wallet, as described in BIP32.
Also notice that whenever your users send you ERC20 tokens you won't be able to retrieve them so easily, since in order to do so you'll firstly need to send enough ETH to the account you want to retrieve funds from, sacrificing a bit of dust in the process.
As a possible solution, you could use this method to derive accounts for your users. For instance, assuming your users have unique IDs as integers, you could do the following:
var hd_key = EthereumHDKey.fromMasterSeed(<seed>); var account = hd_key.derivePath("m/44'/60'/0'/<your user ID as a string>/");
That will generate public/private keys and an address for the user identified by its ID.