How to generate a check sum string?
-
Hi all, I need to generate a check sum string from visual basic and pass to a Java implemented class according to the specification. the requirement from user spec is saying that the check sum string should base on the following formula. e.g. (Username + UserId + Transaction Amount + Transaction Date). suppose I have the above parameters, but how can I generate the MD5 checksum string from VB? can you provide an example? is it using Security.Cryptography.MD5CryptoServiceProvider ? P.S. I need to genereate the checksum as a STRING. thanks
-
Hi all, I need to generate a check sum string from visual basic and pass to a Java implemented class according to the specification. the requirement from user spec is saying that the check sum string should base on the following formula. e.g. (Username + UserId + Transaction Amount + Transaction Date). suppose I have the above parameters, but how can I generate the MD5 checksum string from VB? can you provide an example? is it using Security.Cryptography.MD5CryptoServiceProvider ? P.S. I need to genereate the checksum as a STRING. thanks
-
thanks for your reply, Abhinav However, I'm not generate a checksum from a file stream. firstly, i get a combination string from the parameters and by the formula I will get string org_str = "JOHN_C2182_20102009" I need a method to generate a checksum string from the above "org_str" do you have other example? thanks
-
thanks for your reply, Abhinav However, I'm not generate a checksum from a file stream. firstly, i get a combination string from the parameters and by the formula I will get string org_str = "JOHN_C2182_20102009" I need a method to generate a checksum string from the above "org_str" do you have other example? thanks
http://forum.catalyst2.com/scripting-support/503-basic-md5-one-way-not-reversible-encryption-vbulletin-net.html[^]
My advice is free, and you may get what you paid for.
-
Hi all, I need to generate a check sum string from visual basic and pass to a Java implemented class according to the specification. the requirement from user spec is saying that the check sum string should base on the following formula. e.g. (Username + UserId + Transaction Amount + Transaction Date). suppose I have the above parameters, but how can I generate the MD5 checksum string from VB? can you provide an example? is it using Security.Cryptography.MD5CryptoServiceProvider ? P.S. I need to genereate the checksum as a STRING. thanks
There is an infinite number of definitions for "checksum". All that is basically required is the same data always returns the same checksum, so you could take an algorithm as simple as summing all of the individual bytes, up to wherever your imagination brings you. If MD5 is involved, you still have to decide how your original data would be presented to it, and how the resulting bytes would be converted to the output format your system wants. Without a detailed description of the algorithm used on one side, you'll have a very hard time coming up with a matching implementation for the other side. Having one side implemented in either .NET or Java should allow you to peek into the code (using Reflector for .NET, JAD for Java) and create the same stuff again in e.g. VB.NET If, not clear, you need VB, not VB.NET, then I don't know MD5 implementations are readily available. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Happy New Year to all.
We hope 2010 soon brings us automatic PRE tags!
Until then, please insert them manually.
modified on Wednesday, January 13, 2010 7:49 AM