예제 #1
0
        public static string Encrypt(string value)
        {
            Symmetric sym = new Symmetric();

            CPM.Business.Global.Account.Encryption.Data encryptedData = default(CPM.Business.Global.Account.Encryption.Data);
            encryptedData = sym.Encrypt(new CPM.Business.Global.Account.Encryption.Data(value));

            return(encryptedData.Base64);
        }
예제 #2
0
        public static string Decrypt(string value)
        {
            Symmetric sym = new Symmetric();

            CPM.Business.Global.Account.Encryption.Data encryptedData = new CPM.Business.Global.Account.Encryption.Data();
            encryptedData.Base64 = value;

            CPM.Business.Global.Account.Encryption.Data decryptedData = default(CPM.Business.Global.Account.Encryption.Data);
            decryptedData = sym.Decrypt(encryptedData);

            return(decryptedData.Text);
        }