TSHAK encryption problem C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SpecialKay
    New Member
    • Mar 2008
    • 109

    TSHAK encryption problem C#

    So im having a problem decrypting a query string using Tshak.


    encryption code:

    [code=text]
    private SecureQueryStri ng objStrT = new SecureQueryStri ng();
    StringBuilder retURL = new StringBuilder(2 55);

    objStrT.Add("TO FUPaymentOrderI D", order.OrderId);
    objStrT.Add("Us erComplete", "true");
    objStrT.ExpireT ime = DateTime.Now.Ad dMinutes(20);

    retURL.Append(r eturnURL);
    retURL.Append(o bjStrT.ToString ());

    [/code]

    decryption code:

    [code=text]

    SecureQueryStri ng objQS = new SecureQueryStri ng(HttpUtility. UrlDecode(Reque st["params"]));
    orderID = objQS["TOFUPaymentOrd erID"].ToString();

    [/code]

    problem:

    It is telling me that the string TOFUPaymentOrde rID doesnt exist.

    what i think is happening, the encrypted string is getting URLencoded, then it doesnt look the same and the encrypted string on the other end. Possible?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Originally posted by SpecialKay
    what i think is happening, the encrypted string is getting URLencoded, then it doesnt look the same and the encrypted string on the other end. Possible?
    I would say very possible.
    I assume you have played around with adding/removing the UrlEncode/decode calls?

    You made the SecureQueryStri ng class yourself yes? I don't seem to have access to it.

    Comment

    • SpecialKay
      New Member
      • Mar 2008
      • 109

      #3
      no i didnt make it... it comes with TSHAK.
      i use

      using TSHAK.Component s;

      Comment

      Working...