public AuthenticationHttpMoudle() { _logger = new DefaultLoggerFactory().GetLogger(); _logger.DebugFormat("AuthenticationHttpMoudle创建新的实例"); _userService = ServiceLocationHandler.Resolver <IUserService>(); _desCrypto = new DesCrypto("hhyjuuhd", "mmnjikjh"); _systemAuthenticationHandlers = new List <IAuthenticationHandler>(); _systemAuthenticationHandlers.Add(new DefaultAuthenticationHandler()); _customAuthenticationHandlers = new List <IAuthenticationHandler>(); var customHandler = ServiceLocationHandler.Resolver <IAuthenticationHandler>(false); if (customHandler != null) { _customAuthenticationHandlers.Add(customHandler); } }
public static byte[] Encrypto(string strv) => DesCrypto.DesEncrypto(strv, Key, Iv);
public static string Decrypto(byte[] cary) { byte[] bytes = DesCrypto.DesDecrypto(cary, Key, Iv); return(Encoding.Unicode.GetString(bytes)); }