C# Класс CgwMonitorManage.Common.CommonFunction

Показать файл Открыть проект

Открытые методы

Метод Описание
ConvertChannelLabel ( string channelLabel ) : string

将code@ip的通道标识中code提取出来

DecryptByte2Str ( byte pwd, string nodeEntropy ) : string

解密,字节转成字符串

DecryptPassword ( string userPwd, string nodeEntropy ) : string

用户密码解密

EncryptPassword ( string userPassword, string nodeEntropy ) : string

用户密码加密

EncryptStr2Byte ( string pwd, string nodeEntropy ) : byte[]

字符串转成字节,加密

GetAppSetting ( string key ) : string

获取web.config的AppSettings的项

GetAttribute ( XmlElement xmlElement, string nodeName, string attributeName ) : string

读取节点信息

GetSingleNodeValue ( XmlElement xmlElement, string nodeName ) : string

读取Node节点值

PraseBindManner ( string bindname, System.ServiceModel.Channels.Binding &bind ) : void

解析绑定方式

SHA256Encrypt ( string str ) : string

SHA256加密

SetAttribute ( XmlElement xmlElement, string nodeName, string attributeName, string attributeValue ) : void

读取节点信息

UpdateConfig ( string userPassword ) : void

更新配置文件

Описание методов

ConvertChannelLabel() публичный статический Метод

将code@ip的通道标识中code提取出来
public static ConvertChannelLabel ( string channelLabel ) : string
channelLabel string 通道标识
Результат string

DecryptByte2Str() публичный статический Метод

解密,字节转成字符串
public static DecryptByte2Str ( byte pwd, string nodeEntropy ) : string
pwd byte 密码数组解密
nodeEntropy string 增加机密效果,节点名称
Результат string

DecryptPassword() публичный статический Метод

用户密码解密
public static DecryptPassword ( string userPwd, string nodeEntropy ) : string
userPwd string 用户密码.密文
nodeEntropy string 增加加密效果,节点名称
Результат string

EncryptPassword() публичный статический Метод

用户密码加密
public static EncryptPassword ( string userPassword, string nodeEntropy ) : string
userPassword string 用户密码.明文
nodeEntropy string 增加加密效果,节点名称
Результат string

EncryptStr2Byte() публичный статический Метод

字符串转成字节,加密
public static EncryptStr2Byte ( string pwd, string nodeEntropy ) : byte[]
pwd string 字符串加密
nodeEntropy string 增加机密效果,节点名称
Результат byte[]

GetAppSetting() публичный статический Метод

获取web.config的AppSettings的项
public static GetAppSetting ( string key ) : string
key string
Результат string

GetAttribute() публичный статический Метод

读取节点信息
public static GetAttribute ( XmlElement xmlElement, string nodeName, string attributeName ) : string
xmlElement System.Xml.XmlElement
nodeName string
attributeName string
Результат string

GetSingleNodeValue() публичный статический Метод

读取Node节点值
public static GetSingleNodeValue ( XmlElement xmlElement, string nodeName ) : string
xmlElement System.Xml.XmlElement
nodeName string
Результат string

PraseBindManner() публичный статический Метод

解析绑定方式
public static PraseBindManner ( string bindname, System.ServiceModel.Channels.Binding &bind ) : void
bindname string 绑定方式字符串
bind System.ServiceModel.Channels.Binding 绑定的句柄
Результат void

SHA256Encrypt() публичный статический Метод

SHA256加密
public static SHA256Encrypt ( string str ) : string
str string
Результат string

SetAttribute() публичный статический Метод

读取节点信息
public static SetAttribute ( XmlElement xmlElement, string nodeName, string attributeName, string attributeValue ) : void
xmlElement System.Xml.XmlElement
nodeName string
attributeName string
attributeValue string
Результат void

UpdateConfig() публичный статический Метод

更新配置文件
public static UpdateConfig ( string userPassword ) : void
userPassword string
Результат void