I am trying to integrate my ASP page with an external application that
sends me a QueryString that is URLEncoded and each Name and Value in
the QueryString is Base64 Encoded as well.
---------------------------------------------------------------
Sample QueryString:
MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ%3D%3DMjM3MzpiMTcxO DYwOjc%3D%26NzQzMTpwcm9kQWdlbmN5SUQ6MTI%3D%3DMjcxN jowMDUxMjIwODo4%26MTA0MjE6cHJvZEFnZW5jeU5hbWU6MTQ% 3D%3DMzA1NTA6REFVR0hFUlRZICYgQ08gSU5TIEJST0tFUlMgS U5DOjMw
---------------------------------------------------------------
I know what the named items in the QueryString are and accurately
Base64 encode them so that I see the text in the QueryString. But when
I try to get the matching value from the QueryString, I get an empty
string returned.
Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ%3D") = ''
Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ=") = ''
I tried looping through the name/value pairs in the QueryString but it
seems to think the entire QueryString is 1 named item with no value. I
put single quotes around each name and each value and got the
following:
'MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ==MjM3MzpiMTcxODYw Ojc=&NzQzMTpwcm9kQWdlbmN5SUQ6MTI==MjcxNjowMDUxMjIw ODo4&MTA0MjE6cHJvZEFnZW5jeU5hbWU6MTQ==MzA1NTA6REFV R0hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5DOjMw'
= ''
Any ideas how I can parse out each Base64-encoded name to to get the
matching Base64-encoded value?
Thanks,
Michael Levy 3 3276
"Michael" <Mi*****@MichaelLevy.net> wrote in message
news:44**************************@posting.google.c om... I am trying to integrate my ASP page with an external application that sends me a QueryString that is URLEncoded and each Name and Value in the QueryString is Base64 Encoded as well.
I think the mistake that is being made is that only the name/values should
be URLEncoded, but in your case the entire string (including the "=") has
been encoded. There's no way to decode it. For example, if I had a
variable named foo, with a value of 1+1=2, that should be URLEncoded as:
foo=1%2B1%3D2
But instead, you have encoded the entire string:
foo%3D1%2B1%3D2
There is no way to know how to decode this so that the first %3D is the "="
between the name/value pair.
Peter Foti --------------------------------------------------------------- Sample QueryString:
MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ%3D%3DMjM3MzpiMTcxO DYwOjc%3D%26NzQzMTpwcm9kQW
dlbmN5SUQ6MTI%3D%3DMjcxNjowMDUxMjIwODo4%26MTA0MjE6 cHJvZEFnZW5jeU5hbWU6MTQ%3D
%3DMzA1NTA6REFVR0hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5 DOjMw ---------------------------------------------------------------
I know what the named items in the QueryString are and accurately Base64 encode them so that I see the text in the QueryString. But when I try to get the matching value from the QueryString, I get an empty string returned.
Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ%3D") = '' Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ=") = ''
I tried looping through the name/value pairs in the QueryString but it seems to think the entire QueryString is 1 named item with no value. I put single quotes around each name and each value and got the following:
'MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ==MjM3MzpiMTcxODYw Ojc=&NzQzMTpwcm9kQWdlbmN5S
UQ6MTI==MjcxNjowMDUxMjIwODo4&MTA0MjE6cHJvZEFnZW5je U5hbWU6MTQ==MzA1NTA6REFVR0
hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5DOjMw' = ''
Any ideas how I can parse out each Base64-encoded name to to get the matching Base64-encoded value?
Thanks, Michael Levy
Just URLUnencode it and then split for name value pairs and Base64 Unencode
the values - the code to achieve both is readily available on Google.
Chris.
"Peter Foti" <pe***@Idontwantnostinkingemailfromyou.com> wrote in message
news:10*************@corp.supernews.com...
"Michael" <Mi*****@MichaelLevy.net> wrote in message
news:44**************************@posting.google.c om... I am trying to integrate my ASP page with an external application that sends me a QueryString that is URLEncoded and each Name and Value in the QueryString is Base64 Encoded as well.
I think the mistake that is being made is that only the name/values should
be URLEncoded, but in your case the entire string (including the "=") has
been encoded. There's no way to decode it. For example, if I had a
variable named foo, with a value of 1+1=2, that should be URLEncoded as:
foo=1%2B1%3D2
But instead, you have encoded the entire string:
foo%3D1%2B1%3D2
There is no way to know how to decode this so that the first %3D is the "="
between the name/value pair.
Peter Foti --------------------------------------------------------------- Sample QueryString:
MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ%3D%3DMjM3MzpiMTcxO DYwOjc%3D%26NzQzMTpwcm9kQW
dlbmN5SUQ6MTI%3D%3DMjcxNjowMDUxMjIwODo4%26MTA0MjE6 cHJvZEFnZW5jeU5hbWU6MTQ%3D
%3DMzA1NTA6REFVR0hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5 DOjMw ---------------------------------------------------------------
I know what the named items in the QueryString are and accurately Base64 encode them so that I see the text in the QueryString. But when I try to get the matching value from the QueryString, I get an empty string returned.
Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ%3D") = '' Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ=") = ''
I tried looping through the name/value pairs in the QueryString but it seems to think the entire QueryString is 1 named item with no value. I put single quotes around each name and each value and got the following:
'MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ==MjM3MzpiMTcxODYw Ojc=&NzQzMTpwcm9kQWdlbmN5S
UQ6MTI==MjcxNjowMDUxMjIwODo4&MTA0MjE6cHJvZEFnZW5je U5hbWU6MTQ==MzA1NTA6REFVR0
hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5DOjMw' = ''
Any ideas how I can parse out each Base64-encoded name to to get the matching Base64-encoded value?
Thanks, Michael Levy
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:OF****************@TK2MSFTNGP09.phx.gbl... Just URLUnencode it and then split for name value pairs and Base64
Unencode the values - the code to achieve both is readily available on Google.
That will not work. If the original "=" seperating the name/value pairs had
not been encoded, then yes, you could have unencoded the name value pairs.
But with the entire string encoded, there's no way to know whether an equal
sign is meant to be a delimeter between name/value, or if it's part of the
value.
For example:
foo%3D1%2B1%3D2
If you were to unencode this, you would get:
foo=1+1=2
Now, is the variable name foo? Or is it foo=1+1?
Regards,
Peter Chris.
"Peter Foti" <pe***@Idontwantnostinkingemailfromyou.com> wrote in message news:10*************@corp.supernews.com... "Michael" <Mi*****@MichaelLevy.net> wrote in message news:44**************************@posting.google.c om... I am trying to integrate my ASP page with an external application that sends me a QueryString that is URLEncoded and each Name and Value in the QueryString is Base64 Encoded as well. I think the mistake that is being made is that only the name/values should be URLEncoded, but in your case the entire string (including the "=") has been encoded. There's no way to decode it. For example, if I had a variable named foo, with a value of 1+1=2, that should be URLEncoded as:
foo=1%2B1%3D2
But instead, you have encoded the entire string:
foo%3D1%2B1%3D2
There is no way to know how to decode this so that the first %3D is the
"=" between the name/value pair.
Peter Foti
--------------------------------------------------------------- Sample QueryString:
MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ%3D%3DMjM3MzpiMTcxO DYwOjc%3D%26NzQzMTpwcm9kQW
dlbmN5SUQ6MTI%3D%3DMjcxNjowMDUxMjIwODo4%26MTA0MjE6 cHJvZEFnZW5jeU5hbWU6MTQ%3D %3DMzA1NTA6REFVR0hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5 DOjMw ---------------------------------------------------------------
I know what the named items in the QueryString are and accurately Base64 encode them so that I see the text in the QueryString. But when I try to get the matching value from the QueryString, I get an empty string returned.
Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ%3D") = '' Request.QueryString("MTAwMjg6cHJvZFByb2R1Y2VySUQ6M TQ=") = ''
I tried looping through the name/value pairs in the QueryString but it seems to think the entire QueryString is 1 named item with no value. I put single quotes around each name and each value and got the following:
'MTAwMjg6cHJvZFByb2R1Y2VySUQ6MTQ==MjM3MzpiMTcxODYw Ojc=&NzQzMTpwcm9kQWdlbmN5S
UQ6MTI==MjcxNjowMDUxMjIwODo4&MTA0MjE6cHJvZEFnZW5je U5hbWU6MTQ==MzA1NTA6REFVR0 hFUlRZICYgQ08gSU5TIEJST0tFUlMgSU5DOjMw' = ''
Any ideas how I can parse out each Base64-encoded name to to get the matching Base64-encoded value?
Thanks, Michael Levy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ramy076 |
last post by:
I have a C App which uses openssl for Encoding and decoding which
needs to be ported to java.
The decoded text does not match between the C App and the java App.
The size of the output itself is...
|
by: Karl Pech |
last post by:
Hi all,
I'm trying to write a program which can read in files in the following
format:
sos_encoded.txt:
---
begin-base64 644 sos.txt
UGxlYXNlLCBoZWxwIG1lIQ==
---
|
by: mvdevnull |
last post by:
hey all
currently i use the following piece of code to check if the string passed to
me can be converted to base64, it is not very efficient and bad, can someone
please suggest another of doing...
|
by: scott |
last post by:
Hi all, trying to use base64. Ill get right to the problem.
I am converting a string into base 64. No problem there.
That base64 string can then be converted back to the orignal string. No...
|
by: py |
last post by:
anyone know how to do perform the equivalent base64.urlsafe_b64encode
and base64.urlsafe_b64decode functions that Python has but in jython?
Jython comes with a base64 module but it does not have...
|
by: Jay |
last post by:
I have bean trying to get my head around reading .GIF files from base64
strings,
Basically I need to specify a filename and convert it to base64 then I
can copy/past the string to wear I want it....
|
by: Russell Warren |
last post by:
I've got a case where I want to convert binary blocks of data (various
ctypes objects) to base64 strings.
The conversion calls in the base64 module expect strings as input, so
right now I'm...
|
by: Roland Rickborn |
last post by:
Hallo zusammen,
in meine Anwendung ist ein Bild eingebettet und oben in der Leiste soll
ein Icon erscheinen.
Ausserdem will ich nur _eine_ Datei ausgeben, also ohne zusärtliche
Bild-Dateien...
|
by: mirandacascade |
last post by:
I am attempting to implement a process, and I'm pretty sure that a
major roadblock is that I do not understand the nomenclature. The
specs indicate that the goal is to calculate a message digest...
|
by: pycraze |
last post by:
Hi ,
I am currently trying to implement base64 encoding and decoding
scheme in C . Python has a module , base64 , that will do the
encoding and decoding with ease . I am aware of OpenSSL having...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |