dimanche 30 novembre 2014

Generate a single key from 2 strings in the both order


I would like to generate a hash from 2 different other ones. I need this to generate a key from 2 users id. I would like to be able to crypt the both id like this: crypt(<USER 1>-<USER 2>) === crypt(<USER 2>-<USER 1>).


In another word, whatever the order i crypt the both users ids, i would like the generated key to be the same every time. I do not need to uncrypt the key, just find the same key from the 2 original users id.


I am not very skilled in crypto, is there a module doing this job ?





Aucun commentaire:

Enregistrer un commentaire