1) I have not understand what I should do. 
2) When I use sha_256 encryption, the token from the database does not validate with the link token. I have no idea why this is happening. I tried also to use base_64 encode but the problem remains. I will try to generate a random hex value as you suggested me.