P
Peter Afonin
Hello,
I'm struggling with the string conversion to MD5 which I've never user
before.
I have a string that I need to encode which looks approximately like this:
"pva:0.05:101214a7735tH:inv_desc=205308:shp_Email=petera_gudzon.net:lang
=ru:shp_PaymentNo=20040825205308:shp_UserID=pva:shp_Price=2.95:shp_HostPlan=
BU:shp_Term=2"
I'm doing it this way:
Dim hashedBytes As Byte()
Dim md5 As New MD5CryptoServiceProvider
Dim encoder As New ASCIIEncoding
hashedBytes = md5.ComputeHash(encoder.GetBytes(sCRC))
Dim sNewCRC as String = Convert.ToString(md5.ComputeHash(hashedBytes))
It doesn't work. When I see the output on the page where I pass this string,
it looks like this:
'<input type=hidden name=crc value="System.Byte[]">'+
I don't know exactly how it should look like, but probably not like
"System.Byte[]"
I'm doing something wrong, but I don't know what.
I would really appreciate your help.
Thank you,
Peter Afonin
I'm struggling with the string conversion to MD5 which I've never user
before.
I have a string that I need to encode which looks approximately like this:
"pva:0.05:101214a7735tH:inv_desc=205308:shp_Email=petera_gudzon.net:lang
=ru:shp_PaymentNo=20040825205308:shp_UserID=pva:shp_Price=2.95:shp_HostPlan=
BU:shp_Term=2"
I'm doing it this way:
Dim hashedBytes As Byte()
Dim md5 As New MD5CryptoServiceProvider
Dim encoder As New ASCIIEncoding
hashedBytes = md5.ComputeHash(encoder.GetBytes(sCRC))
Dim sNewCRC as String = Convert.ToString(md5.ComputeHash(hashedBytes))
It doesn't work. When I see the output on the page where I pass this string,
it looks like this:
'<input type=hidden name=crc value="System.Byte[]">'+
I don't know exactly how it should look like, but probably not like
"System.Byte[]"
I'm doing something wrong, but I don't know what.
I would really appreciate your help.
Thank you,
Peter Afonin