Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

md5 hashing to store passwords with ms sql

Enthusiast ,
May 22, 2009 May 22, 2009

When using md5 hashing to store passwords with ms mql everything works fine with alpha numeric values except space characters, which don't work when the user types in the password in the flex app, an unmatching m5d checksum is therefore being produced when space characters are in the password client side and passed to coldfusion and then to ms sql

    <cfquery name="q" datasource="#d#">
                select     * from     USERS
            where userName = <cfqueryparam value="#arguments.value#" cfsqltype="cf_sql_varchar">
            AND password =  HashBytes('MD5', <cfqueryparam value="#arguments.password#" cfsqltype="cf_sql_varchar">

any ideas?

TOPICS
Database access
937
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 22, 2009 May 22, 2009
LATEST

Another weird thing I see ms sql Management studio is if I do the following:

SELECT TOP 1password
  FROM [USERS]
 
SELECT  HashBytes('MD5', 'ignore17832')

the two rows are:

Z ^‹&#157;@á2—€Ö.¢&]Š

0xF273CA388B7E8267FCE4827D479853CE

confusing

why is one a hex and the other the weird stuff

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources