Decrypt() static private method

static private Decrypt ( string encryptedString ) : string
encryptedString string
return string
Ejemplo n.º 1
0
 /// <summary>
 /// Gets the basic auth cookie.
 /// </summary>
 /// <returns></returns>
 internal static string GetBasicAuthCookie()
 {
     try {
         string cookieName = BasicAuthenticationHelper.CookieName;
         if (!string.IsNullOrEmpty(cookieName))
         {
             if (HttpContext.Current.Request.Cookies[cookieName] != null && !string.IsNullOrEmpty(HttpContext.Current.Request.Cookies[cookieName].Value))
             {
                 return
                     (AuthenticationEncryption.Decrypt(
                          HttpContext.Current.Request.Cookies[cookieName].Value));
             }
         }
     } catch (Exception ex) {
         ApplicationException aex = new ApplicationException("Crafted.Volva.CookieHelper.GetAuthCookie() threw an unhandled exception.", ex);
         //Logging.LogError(aex);
         return(String.Empty);
     }
     return(String.Empty);
 }