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

  • SEARCH
  • Home
  • 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 7000455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:40:24+00:00 2026-05-27T20:40:24+00:00

There are a lot of questions on Stack Overflow about how to store user

  • 0

There are a lot of questions on Stack Overflow about how to store user passwords, and the general advice of course is to hash the passwords and compare hashes.

However, imagine you are building a shrinkwrap intranet application (like SharePoint) that people deploy in their own environments. And suppose it requires a username/password combination to access an external service via HTTP (solutions that rely on API keys or federated security aren’t supported).

In this case, we can’t hash the password because we will need to pass the original password to the web service that we call. Encrypting would be the second best solution, but what would we use for the encryption key? If an attacked compromised the database, presumably they would have access to whatever key is used to encrypt the data in the first place?

If it was really a requirement for you to get the plain-text version of a stored password, how would you approach the problem in the most secure way?

  • 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. Editorial Team
    Editorial Team
    2026-05-27T20:40:24+00:00Added an answer on May 27, 2026 at 8:40 pm

    This is actually a really interesting question. I’ll join in.

    You should encrypt it when storing it. No matter how you look at it it’s better than storing it in plain text. Let’s say an attacker finds an sql injection ad dumps the db, he still don’t hold the encryption key. On the other hand, if he gets access to the server he will probably also find the encryption key.

    To improve it a bit, you could store the encryption key in the server configuration. Assuming you are using Apache, you could use SetEnv.

    I in my environment are required to enter the encryption key when Apache starts, this is then stored as en environment variable, so the key isn’t really stored anywhere on my server.

    There is no way, unless you require the user to enter a key to decrypt the password that you will be 100% safe.

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

Sidebar

Related Questions

There are a lot of questions relating to license keys asked on Stack Overflow.
There are a lot of questions on Stackoverflow about curl but I could not
I know there are a lot of similar questions to this one around Stack
There are a lot of questions about didRegisterForRemoteNotificationsWithDeviceToken but they all sidestep a very
There's a lot of questions about bookmarks but none of them answers my question:
There are a lot of questions about formatting forms so that labels align, and
I know that there are a lot of questions and answers exactly about this
I know there have been a lot of questions about Entity Framework doing cross
I know there are a lot of such questions on stackoverflow but I couldn't
There are a lot of SQL Top N questions on stackoverflow but I can't

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.