コード例 #1
0
 private string GetTokenFromFile()
 {
     using (var reader = new StreamReader(filename))
     {
         var token = reader.ReadLine();
         return(Cryptographer.Decrypt(token));
     }
 }
コード例 #2
0
 private void WriteDataToFile(string token, long user_ID)
 {
     using (var writer = new StreamWriter(filename))
     {
         writer.WriteLine(Cryptographer.Encrypt(token));
         writer.Write(Cryptographer.Encrypt(user_ID.ToString()));
     }
 }
コード例 #3
0
 private long GetUserIDFromFile()
 {
     using (var reader = new StreamReader(filename))
     {
         reader.ReadLine();
         var str    = reader.ReadLine();
         var id_str = Cryptographer.Decrypt(str);
         return(long.Parse(id_str));
     }
 }