using SHA1 to encrypt the device id and return it back after registration