Example #1
0
        //private log4net.ILog _log = log4net.LogManager.GetLogger("PassWordBooks");
        public MainWindow()
        {
            InitializeComponent();
            string str = "{'张志超':'你妈妈','data':[{},{}]}", key = "04551df76713561574a6183f050503bd", re = string.Empty, re1 = string.Empty;

            EncryptAndDecodeServer.IEncryptAndDecodeServer i = new EncryptAndDecodeServer.EncryptAndDecodeServer();
            re  = i.AesEncryption(str, key);
            re1 = i.AesDecryption(re, key);
        }
Example #2
0
 public string GetPhysicsKey(string filePath, string passWordSecurity)
 {
     if (System.IO.File.Exists(filePath))
     {
         throw new NullReferenceException("物理文件密钥未查询到");
     }
     EncryptAndDecodeServer.IEncryptAndDecodeServer server = new EncryptAndDecodeServer.EncryptAndDecodeServer();
     using (System.IO.StreamReader sw = new System.IO.StreamReader(filePath))
     {
         string str = sw.ReadToEnd();
         str = server.AesDecryption(str, passWordSecurity);
         return(str);
     }
 }