public static void WriteFile(ApikeyPrefs account)
        {
            string accountJson = JsonUtility.ToJson(account);

            byte[] encryptedBinary = RijndaelEncryption.Encrypt(Encoding.ASCII.GetBytes(accountJson), EncyptPassword);
            File.WriteAllBytes(RecordFilePath, encryptedBinary);
        }
Example #2
0
        public void OnSaveButtonClicked()
        {
            ApikeyPrefs apiKeyPref = new ApikeyPrefs();

            apiKeyPref.apikey = apiKeyInputField.text;
            apiKeyPref.secret = secretInputField.text;
            ApikeyPrefs.WriteFile(apiKeyPref);
        }