def register(self, username, user, mobile_device, network_details, public_key, symmetric_key): if self.encryption: symmetric_key = RSA._rsa_encrypt_and_encode(self.server_public_key, symmetric_key) encoded = Serialization.serialize_registeruser(username, user, mobile_device, network_details, str(public_key.n), str(public_key.e), symmetric_key) response = self.__post('register', encoded, rsa_encrypt=self.encryption) return Serialization.deserialize_registeruserresponse(response)