Does Anybody Know how to decrypt cookies in C#.net?

Discussion in 'C#' started by night.rider, Aug 16, 2009.

  1. night.rider

    night.rider New Member

    Joined:
    Jul 13, 2009
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    create and implement Logic..
    Location:
    somewhere
    Does Anybody Know how to decrypt cookies in C#.net then please tell me. it would be gr8 help
     
  2. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com
    naimish might be able to help you
     
  3. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,043
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    Sorry for the delay, I will post it soon :D
     
  4. Ami Desai

    Ami Desai Member

    Joined:
    Jan 5, 2017
    Messages:
    42
    Likes Received:
    17
    Trophy Points:
    8
    Location:
    Ahmedabad
    Home Page:
    http://www.ifourtechnolab.com/
    Hi,

    You can check this
    Code:
    var bytes = Convert.FromBase64String(Request.Cookies["NameOfCookie"].Value);
    var output = MachineKey.Unprotect(bytes, "ProtectCookie");
    string result = Encoding.UTF8.GetString(output);
    Thanks
     
    shabbir likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice