Exemple #1
0
 internal static string Encrypt(string data)
 {
     Gmis.Protection.DataProtection rsaPro=new Gmis.Protection.DataProtection();
     rsaPro.PublicKey=RSAPublicKey;
     string strData=rsaPro.EncryptText(data);
     return strData;
 }
Exemple #2
0
 internal static string Decrypt(string fileName)
 {
     Gmis.Protection.DataProtection rsaPro=new Gmis.Protection.DataProtection();
     rsaPro.Privatekey=RSAPrivateKey;
     string strData=rsaPro.DecryptFile(fileName);
     return strData;
 }
Exemple #3
0
        internal static string Decrypt(string fileName)
        {
            Gmis.Protection.DataProtection rsaPro = new Gmis.Protection.DataProtection();
            rsaPro.Privatekey = RSAPrivateKey;
            string strData = rsaPro.DecryptFile(fileName);

            return(strData);
        }
Exemple #4
0
        internal static string Encrypt(string data)
        {
            Gmis.Protection.DataProtection rsaPro = new Gmis.Protection.DataProtection();
            rsaPro.PublicKey = RSAPublicKey;
            string strData = rsaPro.EncryptText(data);

            return(strData);
        }