Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 182485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:56:53+00:00 2026-05-11T14:56:53+00:00

I think what I am about to ask is impossible, however, figured it was

  • 0

I think what I am about to ask is impossible, however, figured it was worth a shot here.

We have an application that makes use of SQL Servers PWDEncrypt and PWDCompare functions.

Part of the system creates duplicates of users (same logon and password). Due to a bug in the system, instead of copying the binary stored PWDEncrypt of a password it performed another PWDEncrypt of the password. Therefore the binary values do not match.

Is it possible to find out if the two binary values are hashes of the same password?

e.g. PWDEncrypt(‘abc’) = PWDEncrypt(‘abc’)

If I can do this then it means I can find out how many users this bug has actually affected rather than having to deal with thousands!

EDIT: To clarify, PWDEncrypt(‘abc’) = PWDEncrypt(‘abc’) will NOT return true as the passwords are hashed to different values.

Whilst I know its impossible to obtain the password from the hash, PWDCOMPARE(‘abc’, PWDENCRYPT(‘abc’)) works, therefore, internally SQL Server must be doing more than just hashing the password you’re comparing and check the values are the same.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:56:53+00:00Added an answer on May 11, 2026 at 2:56 pm

    It seems that Joel’s statement is correct in SQL Server 2000 , but not in SQL Server 2005.

    When you generate the hashes together in the same statement in 2000, they end up with the same salt (random seed number at the beginning) which makes them identical. In 2005 a different salt is always generated, so they never match

    if you try this on SQL Server 2000:

    PRINT PWDEncrypt('abc')
    PRINT PWDEncrypt('abc')
    PRINT PWDEncrypt('aaa')
    PRINT PWDEncrypt('bbb')

    you always have the same salt at the beginning of the hash, where as in 2005 its always different. Also notice that in SQL Server 2005, the hash is shorter as it no longer maintains a copy of the hash in uppercase for case in-sensitive password compatibility.

    If you can generate the hash with the same salt, then you can compare them (which means trying a brute force or dictionary attack) Have a look at this article on how to do it. It shows you how to crack SQL Server password in C using the CryptCreateHash function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Error 2245 could also be a password history problem. Is… May 12, 2026 at 1:17 am
  • Editorial Team
    Editorial Team added an answer The author tells you in the bullet points just below.… May 12, 2026 at 1:17 am
  • Editorial Team
    Editorial Team added an answer You can use context, the following is saying: Search for… May 12, 2026 at 1:17 am

Related Questions

I know, I quite dislike the catch-all survey type questions, but I couldn't think
I have about 4-5 years of background in programming some in C# and some
I need to think about performance limitations of 100 mbps ethernet (including scenarios with
I find the nature of this question to be quite suited for the practical-minded

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.