コード例 #1
0
        /// <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;
            }
        }
コード例 #2
0
ファイル: TripleDESTest.cs プロジェクト: n3wt0n/Crypto
 public void TripleDESEncodeNullString()
 {
     Assert.IsNull(tDES.EncodeString(null));
 }