public async Task <AuthRes> AccountRegister(string userName, string email, string password) { if (userService == null) { userService = MagicOnionClient.Create <IUserService>(baseNetworkManager.ConnectChannel()); } string encUserId = await userService.AccountRegister(sendAES.Encrypt(userName), sendAES.Encrypt(email), sendAES.Encrypt(password)); if (encUserId == "") { return(AuthRes.Failed); } string userId = sendAES.Decrypt(encUserId); //送信とは別のキーで暗号化して保管 PlayerPrefs.SetString(PREF_AUTH_USERID, saveAES.Encrypt(userId)); PlayerPrefs.SetString(PREF_AUTH_PASSWORD, saveAES.Encrypt(password)); return(AuthRes.Success); }