Results 1 to 13 of 13

Thread: [RESOLVED] string to md5

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Posts
    330

    Resolved [RESOLVED] string to md5

    I couldnt find any. can someone help me?

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Posts
    330

    Re: string to md5

    got it lock pl0x

  3. #3

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    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.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [RESOLVED] string to md5

    Is that for NT only?

  7. #7
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    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

  8. #8
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] string to md5

    Quote Originally Posted by DigiRev
    Is that for NT only?
    Win95 OSR2 and later.

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [RESOLVED] string to md5

    Quote 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.

  10. #10
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  11. #11
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] string to md5

    Quote 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.

  12. #12
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    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...

  13. #13
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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
  •  



Click Here to Expand Forum to Full Width