当前位置: 首页>>代码示例>>C#>>正文


C# PortalSecurity.CreateKey方法代码示例

本文整理汇总了C#中DotNetNuke.Security.PortalSecurity.CreateKey方法的典型用法代码示例。如果您正苦于以下问题:C# PortalSecurity.CreateKey方法的具体用法?C# PortalSecurity.CreateKey怎么用?C# PortalSecurity.CreateKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DotNetNuke.Security.PortalSecurity的用法示例。


在下文中一共展示了PortalSecurity.CreateKey方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SubscriberInfo

 public SubscriberInfo()
 {
     ID = Guid.NewGuid().ToString();
     Name = "";
     Description = "";
     Address = "";
     var oPortalSecurity = new PortalSecurity();
     PrivateKey = oPortalSecurity.CreateKey(16);
 }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:9,代码来源:SubscriberInfo.cs

示例2: SubscriberInfo

 public SubscriberInfo()
 {
     this._id = Guid.NewGuid().ToString();
     this._name = "";
     this._description = "";
     this._address = "";
     PortalSecurity portalSecurity = new PortalSecurity();
     this._privateKey = portalSecurity.CreateKey( 16 );
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:9,代码来源:SubscriberInfo.cs

示例3: UpdateValidationKey

 public static XmlDocument UpdateValidationKey(XmlDocument xmlConfig)
 {
     XmlNode xmlMachineKey = xmlConfig.SelectSingleNode("configuration/system.web/machineKey");
     if (xmlMachineKey.Attributes["validationKey"].Value == "F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902")
     {
         var objSecurity = new PortalSecurity();
         string validationKey = objSecurity.CreateKey(20);
         XmlUtils.UpdateAttribute(xmlMachineKey, "validationKey", validationKey);
     }
     return xmlConfig;
 }
开发者ID:rjallepalli,项目名称:PIX_CMS,代码行数:11,代码来源:Config.cs

示例4: UpdateMachineKey

        public static XmlDocument UpdateMachineKey(XmlDocument xmlConfig)
        {
            var portalSecurity = new PortalSecurity();
            string validationKey = portalSecurity.CreateKey(20);
            string decryptionKey = portalSecurity.CreateKey(24);

            XmlNode xmlMachineKey = xmlConfig.SelectSingleNode("configuration/system.web/machineKey");
            XmlUtils.UpdateAttribute(xmlMachineKey, "validationKey", validationKey);
            XmlUtils.UpdateAttribute(xmlMachineKey, "decryptionKey", decryptionKey);

            xmlConfig = AddAppSetting(xmlConfig, "InstallationDate", DateTime.Today.ToString("d", new CultureInfo("en-US")));

            return xmlConfig;
        }
开发者ID:rjallepalli,项目名称:PIX_CMS,代码行数:14,代码来源:Config.cs

示例5: UpdateMachineKey

        public static XmlDocument UpdateMachineKey(XmlDocument xmlConfig)
        {
            PortalSecurity objSecurity = new PortalSecurity();
            string validationKey = objSecurity.CreateKey(20);
            string decryptionKey = objSecurity.CreateKey(24);

            XmlNode xmlMachineKey = xmlConfig.SelectSingleNode("configuration/system.web/machineKey");

            xmlMachineKey.Attributes["validationKey"].InnerText = validationKey;
            xmlMachineKey.Attributes["decryptionKey"].InnerText = decryptionKey;

            xmlConfig = AddAppSetting(xmlConfig, "InstallationDate", DateTime.Today.ToShortDateString());

            return xmlConfig;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:15,代码来源:Config.cs


注:本文中的DotNetNuke.Security.PortalSecurity.CreateKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。