//---------------------------------------------------------------------------------------------------- private static void GenerateRSAKeys(UserSessionServer userInfo) { var rsa = RSALogic.GetNew_RSAProvider(); userInfo.RSA_PublicKey_PEM = RSALogic.Get_PublicPEM(rsa); userInfo.Set__RSA_PrivateKey_XML(RSALogic.Get_PrivateXML(rsa)); }
//private static int BCrypt_Workfactor = 12; //---------------------------------------------------------------------------------------------------- public static UserSessionServer GetUser() { UserSessionServer rtn = null; try { rtn = (UserSessionServer)HttpContext.Current.Session[UserSessionLogic.UserSessionKey]; } catch { } if (rtn == null) { rtn = new UserSessionServer(); HttpContext.Current.Session[UserSessionLogic.UserSessionKey] = rtn; } return(rtn); }