Example #1
0
        public static string UnprotectBSTRFromBase64(string protectedData)
        {
            if (string.IsNullOrEmpty(protectedData))
            {
                return(string.Empty);
            }

            string result = null;

            try
            {
                EncodeUtilsWrap.UnprotectBSTRFromBase64(protectedData, out result, true);
            }
            catch (DllNotFoundException)
            {
                EncodeUtilsWrapD.UnprotectBSTRFromBase64(protectedData, out result, true);
            }

            return(result);
        }
Example #2
0
        public static string ProtectBSTRToBase64(string clearData)
        {
            string result = null;

            try
            {
                EncodeUtilsWrap.ProtectBSTRToBase64(clearData, out result, true);
            }
            catch (DllNotFoundException)
            {
                try
                {
                    EncodeUtilsWrapD.ProtectBSTRToBase64(clearData, out result, true);
                }
                catch (DllNotFoundException)
                {
                }
            }

            return(result);
        }