object GetDefaultValue(ISettingDescriptor setting)
        {
            var value = setting.DefaultValue ?? ConvertValue(null, setting);

            if (setting.IsProtected && value != null)
            {
                value = ProtectedDataUtils.Encrypt((string)value, secretKey ?? typeof(SettingDescriptor).FullName);
            }

            return(value);
        }
        protected virtual object Decrypt(object value)
        {
            var str = value as string;

            return(String.IsNullOrEmpty(str) ? value : ProtectedDataUtils.Decrypt(str, secretKey));
        }