|
-
May 31st, 2008, 07:44 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] string to md5
I couldnt find any. can someone help me?
-
May 31st, 2008, 08:31 AM
#2
Thread Starter
Hyperactive Member
-
May 31st, 2008, 08:35 AM
#3
Re: [RESOLVED] string to md5
-
May 31st, 2008, 08:43 AM
#4
Re: [RESOLVED] string to md5
In case anyone stumbles across here, this is the one I use 'cause it's fast, works, and doesn't require DLLs or anything.
http://www.pscode.com/vb/scripts/Sho...65445&lngWId=1
I haven't checked out CVMichael's.
-
May 31st, 2008, 10:26 AM
#5
Re: [RESOLVED] string to md5
There is also the one built into Windows, which can be used via API calls or via the Crypto API Component (CAPICOM). It offers MD5, SHA1, and many other hash algorithms as well as several styles of encryption and also Base64 encoding/decoding.
-
May 31st, 2008, 10:46 AM
#6
Re: [RESOLVED] string to md5
-
May 31st, 2008, 10:52 AM
#7
Re: [RESOLVED] string to md5
Just like to add a word about MD5 for Files.
I was downloading files that included a MD5 hash number so you could check the download and none of those VB6 classes I tried were 100% accurate, I mean they all seemed to work but sooner or later they would all return a wrong MD5 number making you think the download was bad when it wasn't.
I ended up using this one for checking files, though it has some file size limits it is really fast and was accurate everytime.
Grab file MD5 quickly
btw, never tried CVMichael's
-
May 31st, 2008, 11:40 AM
#8
Re: [RESOLVED] string to md5
 Originally Posted by DigiRev
Is that for NT only?
Win95 OSR2 and later.
-
May 31st, 2008, 11:51 AM
#9
Re: [RESOLVED] string to md5
 Originally Posted by dilettante
Win95 OSR2 and later.
Oh cool. Any chance you can post a link or some code?
Edgemeal - I was worried about that also but have compared the one I linked to, to PHP's md5() function and in every case (so far) it has returned the correct results. I use it mainly for strings though and not large files.
Edit: That one looks better and from description might be using the API's dil is talking about.
-
May 31st, 2008, 11:56 AM
#10
Re: [RESOLVED] string to md5
It is also worth asking what one means when requesting "String to MD5" since MD5 is only defined over a byte stream.
VB Strings are UTF-16 and without care arbitrary and implicit conversions to ANSI can distort things. You really need to make a conscious decision about your conversions or be sure to hash the Unicode values.
Because of this many attempts to write MD5 hash routines in VB6 will fail in places due to unexpected distortions. Anyone's MD5 using Strings internally should be considered dicey.
-
May 31st, 2008, 11:59 AM
#11
Re: [RESOLVED] string to md5
 Originally Posted by DigiRev
Oh cool. Any chance you can post a link or some code?
Edgemeal - I was worried about that also but have compared the one I linked to, to PHP's md5() function and in every case (so far) it has returned the correct results. I use it mainly for strings though and not large files.
Edit: That one looks better and from description might be using the API's dil is talking about.
I can probably convert an SHA1 sample I have here pretty quickly.
Using CAPICOM is much less code, but I won't assume everyone wants the extra dependency.
-
May 31st, 2008, 12:03 PM
#12
Re: [RESOLVED] string to md5
Always better without the dependency. Maybe make a post in the CodeBank if you get the chance? Would be cool to have that in there...
-
May 31st, 2008, 12:56 PM
#13
Re: [RESOLVED] string to md5
Posted as [VB6] CryptoAPI MD5 Hash.
Verified hash of ANSI-converted string against Free online md5 hash calculator.
Last edited by dilettante; May 31st, 2008 at 01:01 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|