本文整理汇总了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);
}
示例2: SubscriberInfo
public SubscriberInfo()
{
this._id = Guid.NewGuid().ToString();
this._name = "";
this._description = "";
this._address = "";
PortalSecurity portalSecurity = new PortalSecurity();
this._privateKey = portalSecurity.CreateKey( 16 );
}
示例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;
}
示例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;
}
示例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;
}