php - Generating a unique key-secret to identify a system -


i need generate unique identifier based on information. there multiple clients , 1 server. each client call web service @ server first time registration. each client send system name (considered unique), logged in user name, date of registration, mac-address (probable) etc.

based on information, want generate unique identifier particular user. server written in php. know hash methods can generate unique key, standard , being used generally?

thanks help.

an effective approach add salt (a few characters known server) concatenated details clients. take hash of data. in example below, salt mysalt.

<?php echo hash('ripemd160', 'mysalt' . clienthostname . clientusername . clientregistrationdate); ?> 

this approach means hash can't guessed/reverse-engineered third party.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -