Encrypt & SetHeader Length Problem
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36135
interpreted = N
texte = I'm trying to encrypt a number and put it into the cart ACCOUNTNUM headerfield. The problem is that only 14 digits of the original number/string areavailable after the DECRYPT. The ACCOUNTNUM field is not limited in lengthbecause I can set it to a string of any length. The problem seems to occuronly when I use URLed ENCRYPT data. From the code & output below, it lookslike the SETHEADER context is not storing all of the URL/ENCRYPT data.I use the [URL] context twice to convert the encrypted data to a hex-onlyvalue (presumably safer for headers & DB data). I also use the [URL] contextinside the SETHEADER context because it seems to automatically unURL data.This way I (hopefully) ensure that the data stored in the header field isdouble-URLed.Thanks in advance for any help / suggestions / workarounds.PeteThe test code and output is below:[!]************ WebCat code: ************ [/!][!]This code has a 12-digit input string and works properly.[/!][text]encryptednum=[url][encryptseed=TestTest]300020001000[/encrypt][/url][/text]Setting encrypted accountnum to [encryptednum]
The decrypted value is [unurl][decryptseed=TestTest][encryptednum][/decrypt][/unurl]...
[setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader]Encrypted accountnum header is [accountnum]
Decrypted accountnum header is [decryptseed=TestTest][unurl][accountnum][/unurl][/decrypt]
************ Output: ************Setting encrypted accountnum to 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8FThe decrypted value is 300020001000...Encrypted accountnum header is 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8FDecrypted accountnum header is 300020001000[!]************ WebCat code: ************ [/!][!]This code has a 16-digit input string and does not work properly.[/!][text]encryptednum=[url][encryptseed=TestTest]4000300020001000[/encrypt][/url][/text]Setting encrypted accountnum to [encryptednum]
The decrypted value is [unurl][decryptseed=TestTest][encryptednum][/decrypt][/unurl]...
[setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader]Encrypted accountnum header is [accountnum]
Decrypted accountnum header is [decryptseed=TestTest][unurl][accountnum][/unurl][/decrypt]
************ Output: ************Setting encrypted accountnum to%11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F%DEA%A6The decrypted value is 4000300020001000...Encrypted accountnum header is%11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7FDecrypted accountnum header is 40003000200010The decrypted header above is missing the last 2 digits.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I'm trying to encrypt a number and put it into the cart ACCOUNTNUM headerfield. The problem is that only 14 digits of the original number/string areavailable after the DECRYPT. The ACCOUNTNUM field is not limited in lengthbecause I can set it to a string of any length. The problem seems to occuronly when I use URLed ENCRYPT data. From the code & output below, it lookslike the SETHEADER context is not storing all of the URL/ENCRYPT data.I use the
[url] context twice to convert the encrypted data to a hex-onlyvalue (presumably safer for headers & DB data). I also use the
[url] contextinside the SETHEADER context because it seems to automatically unURL data.This way I (hopefully) ensure that the data stored in the header field isdouble-URLed.Thanks in advance for any help / suggestions / workarounds.PeteThe test code and output is below:
[!]************ WebCat code: ************ [/!]
[!]This code has a 12-digit input string and works properly.[/!]
[text]encryptednum=
[url][encryptseed=TestTest]300020001000[/encrypt][/url][/text]Setting encrypted accountnum to [encryptednum]
The decrypted value is
[unurl][decryptseed=TestTest][encryptednum][/decrypt][/unurl]...
[setheader cart=
[cart]]accountnum=
[url][encryptednum][/url][/setheader]Encrypted accountnum header is [accountnum]
Decrypted accountnum header is [decryptseed=TestTest]
[unurl][accountnum][/unurl][/decrypt]
************ Output: ************Setting encrypted accountnum to 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8FThe decrypted value is 300020001000...Encrypted accountnum header is 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8FDecrypted accountnum header is 300020001000[!]************ WebCat code: ************ [/!][!]This code has a 16-digit input string and does not work properly.[/!][text]encryptednum=[url][encryptseed=TestTest]4000300020001000[/encrypt][/url][/text]Setting encrypted accountnum to [encryptednum]
The decrypted value is [unurl][decryptseed=TestTest][encryptednum][/decrypt][/unurl]...
[setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader]Encrypted accountnum header is [accountnum]
Decrypted accountnum header is [decryptseed=TestTest][unurl][accountnum][/unurl][/decrypt]
************ Output: ************Setting encrypted accountnum to%11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F%DEA%A6The decrypted value is 4000300020001000...Encrypted accountnum header is%11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7FDecrypted accountnum header is 40003000200010The decrypted header above is missing the last 2 digits.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Pete Campbell
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCat Ad! (2000)
Online reference (1997)
Protect and Serve (1999)
Authenticate (1997)
Formatting a .txt file (1998)
Searching,Brain Dead! (1999)
Help formatting search results w/ table (1997)
2.0Beta Command Ref (can't find this instruction) (1997)
date format (another question) (2000)
Sku numbers (1997)
taxTotal, grandTotal (1997)
A Global Variable (1997)
[WebDNA] OT: Issue with some clouds (2009)
Access Denied! But why? (1997)
expired beta (1997)
Retrieve deleted files (2001)
[WebDNA] Seriously what is wrong here? (2011)
A question on sub-categories (1997)
displaying New products (Yikes! it's Fixed!) (1997)
eBay's Prostores: What is the industry response? (2005)