MD5DLL: Anyone?

Discussion in 'ASP General' started by Antonio Ooi, Apr 10, 2004.

  1. Antonio Ooi

    Antonio Ooi Guest

    Hi,

    Refer to the following code:
    <%
    set oMD5 = Server.CreateObject("MD5DLL.Crypt")
    Response.Write oMD5.EnCrypt("1")
    %>

    If you replace "1" with "2", the result will be the same, that is empty!! In
    this case, how can I store the encrypted password in my database?? How to
    perform comparison? Also, there is a bug whereby you can't do concatenation,
    why? Can somebody help?

    Thanks a lot!

    Best regards,
    Antonio
    Antonio Ooi, Apr 10, 2004
    #1
    1. Advertising

  2. Antonio Ooi

    Antonio Ooi Guest

    Thanks! But I found something in MSDN...
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/se
    curity/encrypteddata.asp

    It sounds good, but never tried yet.

    Antonio

    "Andrew Urquhart" <> wrote in message
    news:HgYdc.139$...
    > Antonio Ooi wrote:
    > > Refer to the following code:
    > > <%
    > > set oMD5 = Server.CreateObject("MD5DLL.Crypt")
    > > Response.Write oMD5.EnCrypt("1")
    > > %>
    > >
    > > If you replace "1" with "2", the result will be the same, that is
    > > empty!! In this case, how can I store the encrypted password in my
    > > database?? How to perform comparison? Also, there is a bug whereby
    > > you can't do concatenation, why? Can somebody help?

    >
    > Don't know about that component but I can think of 2 other options:
    > 1. Your database may have an MD5 hash generator method built-in
    > 2. Use one of the many free MD5 scripts floating around:
    > www.google.com/search?q=MD5 VBScript Javascript
    > --
    > Andrew Urquhart
    > - Archive: www.tinyurl.com/38kzx
    > - Contact: www.andrewu.co.uk/contact/
    > - Employ me: Front/middle tier ASP developer with WAI & web standards
    >
    >
    Antonio Ooi, Apr 10, 2004
    #2
    1. Advertising

  3. Antonio Ooi

    xingye Guest

    It sounds good :p
    xingye, Apr 11, 2004
    #3
  4. Antonio Ooi

    xingye Guest

    ʲôÊÇMCSD?
    xingye, Apr 11, 2004
    #4
  5. Antonio Ooi

    xingye Guest

    ASPÄܲ»ÄܸÄдÊä³ö»º´æµÄÄÚÈÝ£¬¾ÍÊÇ˵ÎÒÄܲ»ÄÜÔÚresponse»¹Ã»ÓÐÊä³ö֮ǰ¸ü¸ÄÀïÃæ
    µÄÄÚÈÝ£¿£¿

    ÎÒ¸ÃÔõôÏòÀÏÍâÌá³öÕâ¸öÎÊÌâ°¡£¬ÎÒÓ¢ÓïÌ«ÀÃÁË£¬Ëµ¶¼Ëµ²»³ö£¬ÎÒ¿ÞÁË:(
    xingye, Apr 11, 2004
    #5
  6. Antonio Ooi

    Roland Hall Guest

    "Antonio Ooi" wrote in message
    news:%...
    : Refer to the following code:
    : <%
    : set oMD5 = Server.CreateObject("MD5DLL.Crypt")
    : Response.Write oMD5.EnCrypt("1")
    : %>
    :
    : If you replace "1" with "2", the result will be the same, that is empty!!
    In
    : this case, how can I store the encrypted password in my database?? How to
    : perform comparison? Also, there is a bug whereby you can't do
    concatenation,
    : why? Can somebody help?

    Code:
    http://www.freevbcode.com/ShowCode.Asp?ID=2366
    Example:
    http://kiddanger.com/utils/md5test.asp

    HTH...

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, Apr 11, 2004
    #6
  7. Antonio Ooi

    Antonio Ooi Guest

    Thanks! It works perfectly! But still looking forward for a COM component
    with smilar effect.

    Thanks a lot!

    "Roland Hall" <nobody@nowhere> wrote in message
    news:Oq56x$...
    > "Antonio Ooi" wrote in message
    > news:%...
    > : Refer to the following code:
    > : <%
    > : set oMD5 = Server.CreateObject("MD5DLL.Crypt")
    > : Response.Write oMD5.EnCrypt("1")
    > : %>
    > :
    > : If you replace "1" with "2", the result will be the same, that is

    empty!!
    > In
    > : this case, how can I store the encrypted password in my database?? How

    to
    > : perform comparison? Also, there is a bug whereby you can't do
    > concatenation,
    > : why? Can somebody help?
    >
    > Code:
    > http://www.freevbcode.com/ShowCode.Asp?ID=2366
    > Example:
    > http://kiddanger.com/utils/md5test.asp
    >
    > HTH...
    >
    > --
    > Roland Hall


    >
    Antonio Ooi, Apr 11, 2004
    #7
  8. Antonio Ooi

    Antonio Ooi Guest

    »º´æµÄÄÚÈÝÈô¸Ä£¬¾ÍʧȥËü±¾À´µÄÒâÒåÁË¡£ÓÃÆäËû·½·¨°É¡£½â¾öµÄ·½·¨£¬ÍùÍù²»Ö»ÓÐÒ»
    ¸ö¡£

    Antonio

    "xingye" <> wrote in message
    news:...
    > ASPÄܲ»ÄܸÄдÊä³ö»º´æµÄÄÚÈÝ£¬¾ÍÊÇ˵ÎÒÄܲ»ÄÜÔÚresponse»¹Ã»ÓÐÊä³ö֮ǰ¸ü¸ÄÀï

    Ãæ
    > µÄÄÚÈÝ£¿£¿
    >
    > ÎÒ¸ÃÔõôÏòÀÏÍâÌá³öÕâ¸öÎÊÌâ°¡£¬ÎÒÓ¢ÓïÌ«ÀÃÁË£¬Ëµ¶¼Ëµ²»³ö£¬ÎÒ¿ÞÁË:(
    >
    >
    Antonio Ooi, Apr 11, 2004
    #8
  9. Antonio Ooi

    xingye Guest

    ¿´À´ÓÃASPÊDz»ÐÐÁË£¬ÎÒÓÃPHP¾Í¿ÉÒÔ£¬²»¹ý»¹ÊÇллÄã:)
    "Antonio Ooi" <> wrote in message
    news:...
    > »º´æµÄÄÚÈÝÈô¸Ä£¬¾ÍʧȥËü±¾À´µÄÒâÒåÁË¡£ÓÃÆäËû·½·¨°É¡£½â¾öµÄ·½·¨£¬ÍùÍù²»Ö»ÓÐ

    Ò»
    > ¸ö¡£
    >
    > Antonio
    >
    > "xingye" <> wrote in message
    > news:...
    > > ASPÄܲ»ÄܸÄдÊä³ö»º´æµÄÄÚÈÝ£¬¾ÍÊÇ˵ÎÒÄܲ»ÄÜÔÚresponse»¹Ã»ÓÐÊä³ö֮ǰ¸ü¸Ä

    Àï
    > Ãæ
    > > µÄÄÚÈÝ£¿£¿
    > >
    > > ÎÒ¸ÃÔõôÏòÀÏÍâÌá³öÕâ¸öÎÊÌâ°¡£¬ÎÒÓ¢ÓïÌ«ÀÃÁË£¬Ëµ¶¼Ëµ²»³ö£¬ÎÒ¿ÞÁË:(
    > >
    > >

    >
    >
    xingye, Apr 11, 2004
    #9
  10. Antonio Ooi

    Roland Hall Guest

    "Antonio Ooi" <> wrote in message
    news:...
    : Thanks! It works perfectly! But still looking forward for a COM component
    : with smilar effect.
    :
    : Thanks a lot!

    You're welcome. Yes, I like the code too. What would the COM offer as an
    advantage?

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, Apr 12, 2004
    #10
  11. Antonio Ooi

    Antonio Ooi Guest

    Well, as far as the security is concerned, especially for encryption
    algorithm, it would be better to encapsulate it using COM. ASP is too expose
    and can be easily amended, either in purpose or not in purpose. If I still
    can't a proper COM for this, I might want to convert the ASP that you sent
    to me to VB COM. Again, thanks for your code.

    Antonio

    "Roland Hall" <nobody@nowhere> wrote in message
    news:...
    > "Antonio Ooi" <> wrote in message
    > news:...
    > : Thanks! It works perfectly! But still looking forward for a COM

    component
    > : with smilar effect.
    > :
    > : Thanks a lot!
    >
    > You're welcome. Yes, I like the code too. What would the COM offer as an
    > advantage?
    >
    > --
    > Roland Hall
    > /* This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose. */
    > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    > WSH 5.6 Documentation -

    http://msdn.microsoft.com/downloads/list/webdev.asp
    > MSDN Library - http://msdn.microsoft.com/library/default.asp
    >
    >
    Antonio Ooi, Apr 12, 2004
    #11
  12. Antonio Ooi

    Roland Hall Guest

    "Antonio Ooi" wrote in message news:...
    : Well, as far as the security is concerned, especially for encryption
    : algorithm, it would be better to encapsulate it using COM. ASP is too
    expose
    : and can be easily amended, either in purpose or not in purpose. If I still
    : can't a proper COM for this, I might want to convert the ASP that you sent
    : to me to VB COM. Again, thanks for your code.

    I didn't write the code and you'd have to look at the restrictions on the
    code regarding modifications.
    Good luck.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, Apr 12, 2004
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CM
    Replies:
    3
    Views:
    1,706
  2. Rukmal Fernando
    Replies:
    4
    Views:
    853
    Richard Grimes [MVP]
    Oct 27, 2003
  3. JDS

    Anyone?? Anyone at all??

    JDS, Sep 26, 2005, in forum: HTML
    Replies:
    2
    Views:
    385
    Montgomery BOO...URNS
    Sep 29, 2005
  4. Steve Williams

    Anyone? Anyone?

    Steve Williams, Sep 16, 2003, in forum: Python
    Replies:
    0
    Views:
    389
    Steve Williams
    Sep 16, 2003
  5. gregarican

    Anyone, anyone...Bueller?

    gregarican, Jun 22, 2007, in forum: Ruby
    Replies:
    2
    Views:
    102
    gregarican
    Jun 22, 2007
Loading...

Share This Page