Example #1
0
        /// <summary>
        /// Get Base85 encoded ConfigKey
        /// </summary>
        /// <returns>encoded config key</returns>
        public static string GetBase85ConfigKey(string key)
        {
            //ConfigKey = "1b^jIFD)e1@<ZKuH\"A+?Ea`p+ATAo6@:Wee+EM+(FD5Z2/N<";
            if (!String.IsNullOrEmpty(ConfigKey))
            {
                return(ConfigKey);
            }

            if (String.IsNullOrEmpty(key))
            {
                return(String.Empty);
            }

            string decoded = key;

            try
            {
                decoded = Encoding.UTF8.GetString(Base85.Decode(decoded));
            }
            catch (Exception e)
            {
                throw new Ris.RequestException(e.Message);
            }
            return(decoded);
        }
Example #2
0
        /// <summary>
        /// Get Base85 encoded ConfigKey
        /// </summary>
        /// <returns>encoded config key</returns>
        public static string GetBase85ConfigKey(string key)
        {
            if (!String.IsNullOrEmpty(ConfigKey))
            {
                return(ConfigKey);
            }

            if (String.IsNullOrEmpty(key))
            {
                return(String.Empty);
            }

            string decoded = key;

            try
            {
                decoded = Encoding.UTF8.GetString(Base85.Decode(decoded));
            }
            catch (Exception e)
            {
                throw new Ris.RequestException(e.Message);
            }
            return(decoded);
        }