I am trying to save symetrically encrypted login information as string in a cookie using Cryptonite and StringTheory. I can encrypt and decrypt the string without trouble, and I can save and retrieve the unencrypted string as a cookie. The POST statement shows the cookie value is derived from the encrypted string but is very different from the value shown after encryption using Trace.
CookieST StringTheory
MyCryptonite4 Cryptonite
SaveCookie ROUTINE
CookieST.SetValue('String to save as cookie')
MyCryptonite4.EncryptString(CookieST,'MyPassKey')
CookieST.Trace
p_web.SetCookie('MyCookie',CookieST.GetValue())
RetrieveCookie ROUTINE
CookieSt.SetValue(p_web.GetValue('MyCookie'))
CookieSt.Trace !result very different
MyCryptonite4.DecryptString(CookieST,'MyPassKey')
!Process decrypted string (note: password hashed on server)
CLIPing the CookieST or p_web. GetValues before saving or after retrieval didn't solve the problem.
Thanks in advance.