/// <summary> /// Save the Twitter access token. Before saving the token will be encrypted. /// </summary> /// <param name="token">Twitter access token</param> /// <param name="tokenSecret">Twitter access token secret</param> public static void saveAccessToken(string token, string tokenSecret) { TripleDES encoder; try { encoder = new TripleDES(); Properties.Settings.Default.accessToken = encoder.EncodeString(token); Properties.Settings.Default.accessTokenSecret = encoder.EncodeString(tokenSecret); Properties.Settings.Default.Save(); } catch (Exception) { throw; } }
public void TripleDESEncodeNullString() { Assert.IsNull(tDES.EncodeString(null)); }